home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / gnu-objc.0 / gnu-objc
Tape Archive  |  1993-03-08  |  584.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: gnu-objc

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (V7), file ./, mode 775 , uid 201 , gid 12 , size 0 , seconds 5344467034 default
98% file data default
100% TrID Sybase iAnywhere database files default (weak)
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 2e 2f 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |./......|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 20 32 |.... 7|75 . 2|
|00000070| 30 31 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |01 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 33 34 34 34 36 37 | 0 | 5344467|
|00000090| 30 33 34 20 20 20 34 31 | 35 36 00 20 00 00 00 00 |034 41|56. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 2e 2f 73 65 6c 66 2d 69 | 73 61 00 00 00 00 00 00 |./self-i|sa......|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 30 31 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |01 . |12 . |
|00000280| 20 20 20 33 31 37 33 20 | 20 35 33 34 33 37 37 37 | 3173 | 5343777|
|00000290| 34 37 35 20 20 20 35 37 | 30 37 00 20 00 00 00 00 |475 57|07. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 52 65 74 75 72 6e 2d 50 | 61 74 68 3a 20 3c 64 67 |Return-P|ath: <dg|
|00000410| 6c 61 74 74 69 6e 40 74 | 72 69 72 65 78 2e 63 6f |lattin@t|rirex.co|
|00000420| 6d 3e 0a 44 61 74 65 3a | 20 4d 6f 6e 2c 20 38 20 |m>.Date:| Mon, 8 |
|00000430| 46 65 62 20 39 33 20 32 | 30 3a 32 30 3a 30 35 20 |Feb 93 2|0:20:05 |
|00000440| 2d 30 38 30 30 0a 46 72 | 6f 6d 3a 20 44 65 6e 6e |-0800.Fr|om: Denn|
|00000450| 69 73 20 47 6c 61 74 74 | 69 6e 67 20 3c 64 67 6c |is Glatt|ing <dgl|
|00000460| 61 74 74 69 6e 40 74 72 | 69 72 65 78 2e 63 6f 6d |attin@tr|irex.com|
|00000470| 3e 0a 54 6f 3a 20 22 47 | 65 6f 66 66 72 65 79 20 |>.To: "G|eoffrey |
|00000480| 53 2e 20 4b 6e 61 75 74 | 68 22 20 3c 67 73 6b 40 |S. Knaut|h" <gsk@|
|00000490| 6d 61 72 62 6c 65 2e 63 | 6f 6d 3e 0a 53 75 62 6a |marble.c|om>.Subj|
|000004a0| 65 63 74 3a 20 52 65 3a | 20 6f 62 6a 65 63 74 2e |ect: Re:| object.|
|000004b0| 6d 2c 20 73 65 6c 66 2d | 3e 69 73 61 0a 43 63 3a |m, self-|>isa.Cc:|
|000004c0| 20 67 6e 75 2d 6f 62 6a | 63 40 70 72 65 70 2e 61 | gnu-obj|c@prep.a|
|000004d0| 69 2e 6d 69 74 2e 65 64 | 75 0a 52 65 70 6c 79 2d |i.mit.ed|u.Reply-|
|000004e0| 54 6f 3a 20 64 65 6e 6e | 69 73 5f 67 6c 61 74 74 |To: denn|is_glatt|
|000004f0| 69 6e 67 40 74 72 69 72 | 65 78 2e 63 6f 6d 0a 0a |ing@trir|ex.com..|
|00000500| 0a 3e 20 57 68 69 6c 65 | 20 49 20 61 6c 73 6f 20 |.> While| I also |
|00000510| 6c 6f 6f 6b 20 61 74 20 | 74 68 69 73 2c 20 63 6f |look at |this, co|
|00000520| 75 6c 64 20 73 6f 6d 65 | 6f 6e 65 20 70 6c 65 61 |uld some|one plea|
|00000530| 73 65 20 63 6f 6d 6d 65 | 6e 74 20 6f 6e 0a 3e 20 |se comme|nt on.> |
|00000540| 77 68 65 74 68 65 72 20 | 74 68 69 73 20 69 73 20 |whether |this is |
|00000550| 61 20 63 6f 72 72 65 63 | 74 20 66 69 78 3f 20 0a |a correc|t fix? .|
|00000560| 0a 3e 20 0a 0a 0a 73 65 | 6c 66 2d 69 73 61 20 69 |.> ...se|lf-isa i|
|00000570| 73 20 28 77 61 73 3f 29 | 20 61 20 76 61 6c 69 64 |s (was?)| a valid|
|00000580| 20 64 65 63 6c 2e 20 20 | 49 74 20 69 73 20 73 74 | decl. |It is st|
|00000590| 69 6c 6c 20 61 20 76 61 | 6c 69 64 20 64 65 63 6c |ill a va|lid decl|
|000005a0| 20 75 6e 64 65 72 20 20 | 0a 4e 65 58 54 53 54 45 | under |.NeXTSTE|
|000005b0| 50 20 33 2e 30 20 74 6f | 6f 2e 0a 0a 0a 2d 64 70 |P 3.0 to|o....-dp|
|000005c0| 67 0a 0a 52 65 74 75 72 | 6e 2d 50 61 74 68 3a 20 |g..Retur|n-Path: |
|000005d0| 3c 70 65 74 72 69 6c 6c | 69 40 67 6e 75 2e 61 69 |<petrill|i@gnu.ai|
|000005e0| 2e 6d 69 74 2e 65 64 75 | 3e 0a 54 6f 3a 20 64 65 |.mit.edu|>.To: de|
|000005f0| 6e 6e 69 73 5f 67 6c 61 | 74 74 69 6e 67 40 74 72 |nnis_gla|tting@tr|
|00000600| 69 72 65 78 2e 63 6f 6d | 0a 43 63 3a 20 67 6e 75 |irex.com|.Cc: gnu|
|00000610| 2d 6f 62 6a 63 40 70 72 | 65 70 2e 61 69 2e 6d 69 |-objc@pr|ep.ai.mi|
|00000620| 74 2e 65 64 75 0a 53 75 | 62 6a 65 63 74 3a 20 52 |t.edu.Su|bject: R|
|00000630| 65 3a 20 6f 62 6a 65 63 | 74 2e 6d 2c 20 73 65 6c |e: objec|t.m, sel|
|00000640| 66 2d 3e 69 73 61 20 0a | 49 6e 2d 52 65 70 6c 79 |f->isa .|In-Reply|
|00000650| 2d 54 6f 3a 20 28 59 6f | 75 72 20 6d 65 73 73 61 |-To: (Yo|ur messa|
|00000660| 67 65 20 6f 66 20 4d 6f | 6e 2c 20 30 38 20 46 65 |ge of Mo|n, 08 Fe|
|00000670| 62 20 39 33 20 32 30 3a | 32 30 3a 30 35 20 50 53 |b 93 20:|20:05 PS|
|00000680| 54 2e 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |T.). | |
|00000690| 20 3c 39 33 30 32 30 39 | 30 34 32 30 2e 41 41 30 | <930209|0420.AA0|
|000006a0| 30 35 37 37 40 73 65 61 | 74 74 6c 65 2e 74 72 69 |0577@sea|ttle.tri|
|000006b0| 72 65 78 2e 63 6f 6d 3e | 20 0a 44 61 74 65 3a 20 |rex.com>| .Date: |
|000006c0| 54 75 65 2c 20 30 39 20 | 46 65 62 20 39 33 20 30 |Tue, 09 |Feb 93 0|
|000006d0| 36 3a 34 38 3a 32 39 20 | 2d 30 36 30 30 0a 46 72 |6:48:29 |-0600.Fr|
|000006e0| 6f 6d 3a 20 43 68 72 69 | 73 20 50 65 74 72 69 6c |om: Chri|s Petril|
|000006f0| 6c 69 20 3c 70 65 74 72 | 69 6c 6c 69 40 67 6e 75 |li <petr|illi@gnu|
|00000700| 2e 61 69 2e 6d 69 74 2e | 65 64 75 3e 0a 0a 0a 3e |.ai.mit.|edu>...>|
|00000710| 3e 3e 3e 3e 20 4f 6e 20 | 4d 6f 6e 2c 20 38 20 46 |>>>> On |Mon, 8 F|
|00000720| 65 62 20 39 33 20 32 30 | 3a 32 30 3a 30 35 20 2d |eb 93 20|:20:05 -|
|00000730| 30 38 30 30 2c 20 44 65 | 6e 6e 69 73 20 47 6c 61 |0800, De|nnis Gla|
|00000740| 74 74 69 6e 67 20 3c 64 | 67 6c 61 74 74 69 6e 40 |tting <d|glattin@|
|00000750| 74 72 69 72 65 78 2e 63 | 6f 6d 3e 20 73 61 69 64 |trirex.c|om> said|
|00000760| 3a 0a 0a 44 65 6e 6e 69 | 73 3e 20 73 65 6c 66 2d |:..Denni|s> self-|
|00000770| 69 73 61 20 69 73 20 28 | 77 61 73 3f 29 20 61 20 |isa is (|was?) a |
|00000780| 76 61 6c 69 64 20 64 65 | 63 6c 2e 20 20 49 74 20 |valid de|cl. It |
|00000790| 69 73 20 73 74 69 6c 6c | 20 61 20 76 61 6c 69 64 |is still| a valid|
|000007a0| 20 64 65 63 6c 20 75 6e | 64 65 72 20 20 0a 44 65 | decl un|der .De|
|000007b0| 6e 6e 69 73 3e 20 4e 65 | 58 54 53 54 45 50 20 33 |nnis> Ne|XTSTEP 3|
|000007c0| 2e 30 20 74 6f 6f 2e 0a | 0a 57 68 69 6c 65 20 69 |.0 too..|.While i|
|000007d0| 74 20 6d 69 67 68 74 20 | 62 65 20 76 61 6c 69 64 |t might |be valid|
|000007e0| 20 69 74 20 69 73 20 45 | 58 54 52 45 45 4d 4c 59 | it is E|XTREEMLY|
|000007f0| 20 62 61 64 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 | bad pro|gramming|
|00000800| 20 73 74 79 6c 65 20 74 | 6f 20 75 73 65 0a 69 74 | style t|o use.it|
|00000810| 2e 20 20 46 6f 72 20 69 | 74 20 74 6f 20 62 65 20 |. For i|t to be |
|00000820| 76 61 6c 69 64 2c 20 79 | 6f 75 20 4d 55 53 54 20 |valid, y|ou MUST |
|00000830| 64 65 63 6c 61 72 65 20 | 74 68 65 20 6f 62 6a 65 |declare |the obje|
|00000840| 63 74 20 74 79 70 65 64 | 20 72 61 74 68 65 72 20 |ct typed| rather |
|00000850| 74 68 61 6e 0a 22 64 79 | 6e 61 6d 69 63 61 6c 6c |than."dy|namicall|
|00000860| 79 20 74 79 70 65 64 22 | 20 61 73 20 77 69 74 68 |y typed"| as with|
|00000870| 20 22 69 64 22 2e 20 20 | 46 6f 72 20 65 78 61 6d | "id". |For exam|
|00000880| 70 6c 65 3a 0a 0a 20 20 | 20 20 20 20 20 20 4f 62 |ple:.. | Ob|
|00000890| 6a 65 63 74 20 2a 6d 79 | 4f 62 6a 65 63 74 3b 0a |ject *my|Object;.|
|000008a0| 0a 20 20 20 20 20 20 20 | 20 70 72 69 6e 74 66 20 |. | printf |
|000008b0| 28 22 25 73 5c 6e 22 2c | 20 6d 79 4f 62 6a 65 63 |("%s\n",| myObjec|
|000008c0| 74 2d 3e 69 73 41 29 3b | 0a 0a 49 73 20 76 61 6c |t->isA);|..Is val|
|000008d0| 69 64 2c 20 62 75 74 20 | 69 74 20 69 73 20 6e 6f |id, but |it is no|
|000008e0| 74 20 67 75 61 72 61 6e | 74 65 65 64 20 74 6f 20 |t guaran|teed to |
|000008f0| 61 6c 77 61 79 73 20 77 | 6f 72 6b 2e 20 20 49 74 |always w|ork. It|
|00000900| 27 73 20 6d 79 20 6f 70 | 69 6e 69 6f 6e 0a 74 68 |'s my op|inion.th|
|00000910| 61 74 20 69 66 20 79 6f | 75 20 48 41 56 45 20 74 |at if yo|u HAVE t|
|00000920| 6f 20 75 73 65 20 74 68 | 69 73 20 74 6f 20 6d 61 |o use th|is to ma|
|00000930| 6b 65 20 69 74 20 77 6f | 72 6b 2c 20 74 68 65 6e |ke it wo|rk, then|
|00000940| 20 79 6f 75 72 20 6d 61 | 63 68 69 6e 65 20 6f 72 | your ma|chine or|
|00000950| 0a 63 6f 6d 70 69 6c 65 | 72 20 69 73 20 62 72 6f |.compile|r is bro|
|00000960| 6b 65 6e 2e 20 20 53 69 | 6e 63 65 20 49 20 75 73 |ken. Si|nce I us|
|00000970| 65 20 41 6c 70 68 61 73 | 20 64 61 69 6c 79 2c 20 |e Alphas| daily, |
|00000980| 49 20 63 61 6e 20 74 65 | 73 74 69 66 79 20 74 68 |I can te|stify th|
|00000990| 61 74 20 69 74 27 73 0a | 74 68 65 20 6d 61 63 68 |at it's.|the mach|
|000009a0| 69 6e 65 20 74 68 61 74 | 27 73 20 62 72 6f 6b 65 |ine that|'s broke|
|000009b0| 6e 20 69 6e 20 6d 79 20 | 6f 70 69 6e 69 6f 6e 2e |n in my |opinion.|
|000009c0| 20 20 41 6e 79 77 61 79 | 2c 20 77 68 65 6e 20 49 | Anyway|, when I|
|000009d0| 20 67 65 74 20 73 6f 6d | 65 0a 73 70 61 72 65 20 | get som|e.spare |
|000009e0| 74 69 6d 65 20 49 27 6d | 20 67 6f 69 6e 67 20 74 |time I'm| going t|
|000009f0| 6f 20 77 6f 72 6b 20 6f | 6e 20 67 65 74 74 69 6e |o work o|n gettin|
|00000a00| 67 20 74 68 65 20 47 43 | 43 20 63 6f 6d 70 69 6c |g the GC|C compil|
|00000a10| 65 72 20 74 6f 20 77 6f | 72 6b 0a 62 65 74 74 65 |er to wo|rk.bette|
|00000a20| 72 20 6f 6e 20 74 68 65 | 20 62 6f 78 65 73 2e 2e |r on the| boxes..|
|00000a30| 2e 20 69 66 20 49 20 68 | 61 76 65 20 74 6f 20 75 |. if I h|ave to u|
|00000a40| 73 65 20 74 68 65 6d 2c | 20 49 20 73 68 6f 75 6c |se them,| I shoul|
|00000a50| 64 20 61 74 20 6c 65 61 | 73 74 20 68 61 76 65 20 |d at lea|st have |
|00000a60| 61 0a 64 65 63 65 6e 74 | 20 63 6f 6d 70 69 6c 65 |a.decent| compile|
|00000a70| 72 2e 0a 0a 43 68 72 69 | 73 0a 0a 00 00 00 00 00 |r...Chri|s.......|
|00000a80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 2e 2f 66 6f 72 77 61 72 | 64 2d 70 65 72 66 6f 72 |./forwar|d-perfor|
|00000c10| 6d 76 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |mv......|........|
|00000c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000c70| 30 31 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |01 . |12 . |
|00000c80| 20 31 33 32 33 36 33 20 | 20 35 33 34 34 30 31 33 | 132363 | 5344013|
|00000c90| 30 36 35 20 20 20 37 35 | 32 35 00 20 00 00 00 00 |065 75|25. ....|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 44 61 74 65 3a 20 4d 6f | 6e 2c 20 31 38 20 4a 61 |Date: Mo|n, 18 Ja|
|00000e10| 6e 20 39 33 20 31 35 3a | 33 34 3a 33 32 20 2d 30 |n 93 15:|34:32 -0|
|00000e20| 36 30 30 0a 46 72 6f 6d | 3a 20 62 75 72 63 68 61 |600.From|: burcha|
|00000e30| 72 64 40 67 65 6f 6d 2e | 75 6d 6e 2e 65 64 75 0a |rd@geom.|umn.edu.|
|00000e40| 54 6f 3a 20 67 6e 75 2d | 6f 62 6a 63 40 70 72 65 |To: gnu-|objc@pre|
|00000e50| 70 2e 61 69 2e 6d 69 74 | 2e 65 64 75 0a 53 75 62 |p.ai.mit|.edu.Sub|
|00000e60| 6a 65 63 74 3a 20 54 68 | 65 20 66 6f 72 77 61 72 |ject: Th|e forwar|
|00000e70| 64 2f 70 65 72 66 6f 72 | 6d 76 20 50 75 7a 7a 6c |d/perfor|mv Puzzl|
|00000e80| 65 0a 0a 49 20 68 61 76 | 65 20 77 72 69 74 74 65 |e..I hav|e writte|
|00000e90| 6e 20 61 20 76 65 72 79 | 2c 20 76 65 72 79 2c 20 |n a very|, very, |
|00000ea0| 76 65 72 79 20 70 72 65 | 6c 69 6d 69 6e 61 72 79 |very pre|liminary|
|00000eb0| 20 73 6f 63 6b 65 74 2d | 62 61 73 65 64 20 64 69 | socket-|based di|
|00000ec0| 73 74 72 69 62 75 74 65 | 64 20 6f 62 6a 65 63 74 |stribute|d object|
|00000ed0| 20 73 79 73 74 65 6d 20 | 74 68 61 74 20 69 73 20 | system |that is |
|00000ee0| 69 6e 74 65 6e 64 65 64 | 20 66 6f 72 20 70 6f 72 |intended| for por|
|00000ef0| 74 69 6e 67 20 74 6f 20 | 47 4e 55 20 4f 62 6a 65 |ting to |GNU Obje|
|00000f00| 63 74 69 76 65 2d 43 2e | 20 20 53 6f 20 66 61 72 |ctive-C.| So far|
|00000f10| 2c 20 74 68 69 73 20 68 | 61 73 20 62 65 65 6e 20 |, this h|as been |
|00000f20| 70 72 69 6d 61 72 69 6c | 79 20 61 6e 20 65 78 65 |primaril|y an exe|
|00000f30| 72 63 69 73 65 20 74 6f | 20 73 65 65 20 77 68 61 |rcise to| see wha|
|00000f40| 74 20 69 73 20 61 63 74 | 75 61 6c 6c 79 20 72 65 |t is act|ually re|
|00000f50| 71 75 69 72 65 64 20 66 | 72 6f 6d 20 74 68 65 20 |quired f|rom the |
|00000f60| 72 75 6e 2d 74 69 6d 65 | 20 69 6e 20 6f 72 64 65 |run-time| in orde|
|00000f70| 72 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 20 73 |r to imp|lement s|
|00000f80| 75 63 68 20 61 20 73 79 | 73 74 65 6d 2e 0a 0a 54 |uch a sy|stem...T|
|00000f90| 68 65 72 65 20 69 73 20 | 6f 6e 65 20 6d 61 6a 6f |here is |one majo|
|00000fa0| 72 20 66 65 61 74 75 72 | 65 20 6d 69 73 73 69 6e |r featur|e missin|
|00000fb0| 67 20 66 72 6f 6d 20 47 | 4e 55 27 73 20 4f 62 6a |g from G|NU's Obj|
|00000fc0| 65 63 74 69 76 65 2d 43 | 20 72 75 6e 2d 74 69 6d |ective-C| run-tim|
|00000fd0| 65 20 61 74 20 74 68 65 | 20 6d 6f 6d 65 6e 74 2c |e at the| moment,|
|00000fe0| 20 77 68 69 63 68 20 70 | 72 65 76 65 6e 74 73 20 | which p|revents |
|00000ff0| 74 68 69 73 20 70 72 6f | 6a 65 63 74 20 66 72 6f |this pro|ject fro|
|00001000| 6d 20 70 72 6f 67 72 65 | 73 73 69 6e 67 20 74 6f |m progre|ssing to|
|00001010| 20 74 68 65 20 6d 6f 72 | 65 20 64 65 73 69 72 61 | the mor|e desira|
|00001020| 62 6c 65 20 76 65 72 79 | 2c 20 76 65 72 79 20 70 |ble very|, very p|
|00001030| 72 65 6c 69 6d 69 6e 61 | 72 79 20 3a 2d 29 20 73 |relimina|ry :-) s|
|00001040| 74 61 67 65 2e 20 20 54 | 68 61 74 20 66 65 61 74 |tage. T|hat feat|
|00001050| 75 72 65 20 69 73 20 74 | 68 65 20 66 75 6e 63 74 |ure is t|he funct|
|00001060| 69 6f 6e 61 6c 69 74 79 | 20 6f 66 20 4e 65 58 54 |ionality| of NeXT|
|00001070| 27 73 20 66 6f 72 77 61 | 72 64 20 61 6e 64 20 70 |'s forwa|rd and p|
|00001080| 65 72 66 6f 72 6d 76 2c | 20 77 68 69 63 68 20 61 |erformv,| which a|
|00001090| 72 65 20 72 65 71 75 69 | 72 65 64 20 69 6e 20 6f |re requi|red in o|
|000010a0| 72 64 65 72 20 74 68 61 | 74 20 61 72 62 69 74 72 |rder tha|t arbitr|
|000010b0| 61 72 79 20 6d 65 73 73 | 61 67 65 73 20 63 61 6e |ary mess|ages can|
|000010c0| 20 62 65 20 63 61 70 74 | 75 72 65 64 20 62 79 20 | be capt|ured by |
|000010d0| 70 72 6f 78 79 20 6f 62 | 6a 65 63 74 73 20 61 6e |proxy ob|jects an|
|000010e0| 64 20 74 68 65 6e 20 6c | 61 74 65 72 20 65 78 65 |d then l|ater exe|
|000010f0| 63 75 74 65 64 20 62 79 | 20 74 68 65 20 72 65 6d |cuted by| the rem|
|00001100| 6f 74 65 20 6f 62 6a 65 | 63 74 73 20 74 68 65 79 |ote obje|cts they|
|00001110| 20 73 74 61 6e 64 20 66 | 6f 72 2e 0a 0a 54 68 65 | stand f|or...The|
|00001120| 20 70 75 7a 7a 6c 65 20 | 49 20 77 6f 75 6c 64 20 | puzzle |I would |
|00001130| 6c 69 6b 65 20 74 6f 20 | 70 6f 73 65 20 74 6f 20 |like to |pose to |
|00001140| 74 68 69 73 20 6d 61 69 | 6c 69 6e 67 20 6c 69 73 |this mai|ling lis|
|00001150| 74 20 69 73 20 68 6f 77 | 20 73 75 63 68 20 61 20 |t is how| such a |
|00001160| 72 75 6e 2d 74 69 6d 65 | 20 66 61 63 69 6c 69 74 |run-time| facilit|
|00001170| 79 20 63 61 6e 20 62 65 | 73 74 20 28 6d 6f 73 74 |y can be|st (most|
|00001180| 20 70 6f 72 74 61 62 6c | 79 29 20 62 65 20 69 6d | portabl|y) be im|
|00001190| 70 6c 65 6d 65 6e 74 65 | 64 2e 20 20 49 74 20 64 |plemente|d. It d|
|000011a0| 6f 65 73 6e 27 74 20 68 | 61 76 65 20 74 6f 20 62 |oesn't h|ave to b|
|000011b0| 65 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 77 69 74 |e compat|ible wit|
|000011c0| 68 20 4e 65 58 54 27 73 | 20 66 6f 72 77 61 72 64 |h NeXT's| forward|
|000011d0| 20 61 6e 64 20 70 65 72 | 66 6f 72 6d 76 3b 20 69 | and per|formv; i|
|000011e0| 74 20 6a 75 73 74 20 6e | 65 65 64 73 20 74 6f 20 |t just n|eeds to |
|000011f0| 70 72 6f 76 69 64 65 20 | 74 68 65 69 72 20 63 61 |provide |their ca|
|00001200| 70 61 62 69 6c 69 74 69 | 65 73 20 28 69 6e 20 66 |pabiliti|es (in f|
|00001210| 61 63 74 2c 20 4e 65 58 | 54 27 73 20 41 50 49 20 |act, NeX|T's API |
|00001220| 69 73 20 70 72 6f 61 62 | 61 62 6c 79 20 61 20 67 |is proab|ably a g|
|00001230| 6f 6f 64 20 6f 6e 65 20 | 74 6f 20 61 76 6f 69 64 |ood one |to avoid|
|00001240| 29 2e 0a 0a 54 68 69 73 | 20 69 73 20 61 20 74 72 |)...This| is a tr|
|00001250| 69 63 6b 79 20 70 75 7a | 7a 6c 65 2c 20 74 68 6f |icky puz|zle, tho|
|00001260| 75 67 68 2c 20 74 68 65 | 20 75 6e 64 65 72 6c 79 |ugh, the| underly|
|00001270| 69 6e 67 20 64 69 66 66 | 69 63 75 6c 74 79 20 62 |ing diff|iculty b|
|00001280| 65 69 6e 67 20 74 68 61 | 74 20 74 68 65 20 43 20 |eing tha|t the C |
|00001290| 6c 61 6e 67 75 61 67 65 | 20 64 6f 65 73 20 6e 6f |language| does no|
|000012a0| 74 20 73 75 70 70 6f 72 | 74 20 74 68 65 20 72 75 |t suppor|t the ru|
|000012b0| 6e 2d 74 69 6d 65 20 63 | 6f 6e 73 74 72 75 63 74 |n-time c|onstruct|
|000012c0| 69 6f 6e 20 6f 66 20 61 | 72 67 75 6d 65 6e 74 20 |ion of a|rgument |
|000012d0| 6c 69 73 74 73 20 61 6e | 64 20 72 65 74 75 72 6e |lists an|d return|
|000012e0| 20 76 61 6c 75 65 73 2e | 20 20 28 49 74 20 64 6f | values.| (It do|
|000012f0| 65 73 6e 27 74 20 72 65 | 61 6c 6c 79 20 73 75 70 |esn't re|ally sup|
|00001300| 70 6f 72 74 20 74 68 65 | 20 72 75 6e 2d 74 69 6d |port the| run-tim|
|00001310| 65 20 64 65 63 6f 6e 73 | 74 72 75 63 74 69 6f 6e |e decons|truction|
|00001320| 20 6f 66 20 61 72 67 75 | 6d 65 6e 74 20 6c 69 73 | of argu|ment lis|
|00001330| 74 73 20 65 69 74 68 65 | 72 2c 20 65 78 63 65 70 |ts eithe|r, excep|
|00001340| 74 20 74 68 61 74 20 77 | 65 20 6e 6f 77 20 68 61 |t that w|e now ha|
|00001350| 76 65 20 73 74 61 6e 64 | 61 72 64 20 68 61 63 6b |ve stand|ard hack|
|00001360| 20 66 6f 72 20 69 74 20 | 63 61 6c 6c 65 64 20 22 | for it |called "|
|00001370| 73 74 64 61 72 67 2e 68 | 22 2e 29 0a 0a 54 68 69 |stdarg.h|".)..Thi|
|00001380| 73 20 70 75 7a 7a 6c 65 | 20 69 73 20 69 72 6f 6e |s puzzle| is iron|
|00001390| 69 63 61 6c 6c 79 20 6d | 61 64 65 20 6d 6f 72 65 |ically m|ade more|
|000013a0| 20 64 69 66 66 69 63 75 | 6c 74 20 62 79 20 74 68 | difficu|lt by th|
|000013b0| 65 20 70 6f 72 74 61 62 | 6c 65 20 6d 65 73 73 61 |e portab|le messa|
|000013c0| 67 65 2d 64 69 73 70 61 | 74 63 68 69 6e 67 20 69 |ge-dispa|tching i|
|000013d0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 63 68 |mplement|ation ch|
|000013e0| 6f 73 65 6e 20 62 79 20 | 47 4e 55 20 4f 62 6a 2d |osen by |GNU Obj-|
|000013f0| 43 2e 20 20 54 68 65 20 | 70 72 6f 62 6c 65 6d 20 |C. The |problem |
|00001400| 68 65 72 65 20 69 73 20 | 74 68 61 74 20 6f 62 6a |here is |that obj|
|00001410| 63 5f 6d 73 67 53 65 6e | 64 28 29 20 6f 6e 6c 79 |c_msgSen|d() only|
|00001420| 20 67 65 74 73 20 74 6f | 20 63 68 6f 6f 73 65 20 | gets to| choose |
|00001430| 61 20 6d 65 74 68 6f 64 | 20 69 6d 70 6c 65 6d 65 |a method| impleme|
|00001440| 6e 74 61 74 69 6f 6e 2c | 20 61 6e 64 20 69 73 20 |ntation,| and is |
|00001450| 68 65 6c 70 6c 65 73 73 | 20 74 6f 20 63 68 61 6e |helpless| to chan|
|00001460| 67 65 20 74 68 65 20 6d | 65 73 73 61 67 65 27 73 |ge the m|essage's|
|00001470| 20 22 73 65 6c 66 22 20 | 61 6e 64 20 22 5f 63 6d | "self" |and "_cm|
|00001480| 64 22 20 28 77 68 69 63 | 68 20 61 72 65 20 68 61 |d" (whic|h are ha|
|00001490| 72 64 2d 63 6f 6d 70 69 | 6c 65 64 20 69 6e 74 6f |rd-compi|led into|
|000014a0| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 63 61 6c | the mes|sage cal|
|000014b0| 6c 20 69 6e 20 74 68 65 | 20 47 4e 55 20 72 75 6e |l in the| GNU run|
|000014c0| 2d 74 69 6d 65 20 73 79 | 73 74 65 6d 29 2e 20 20 |-time sy|stem). |
|000014d0| 49 66 20 74 68 69 73 20 | 77 65 72 65 20 6e 6f 74 |If this |were not|
|000014e0| 20 74 68 65 20 63 61 73 | 65 2c 20 61 20 6c 69 6d | the cas|e, a lim|
|000014f0| 69 74 65 64 20 66 6f 72 | 6d 20 6f 66 20 66 6f 72 |ited for|m of for|
|00001500| 77 61 72 64 69 6e 67 20 | 63 6f 75 6c 64 20 62 65 |warding |could be|
|00001510| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 70 6f 72 | impleme|nted por|
|00001520| 74 61 62 6c 79 2e 0a 0a | 54 68 69 73 20 70 6f 72 |tably...|This por|
|00001530| 74 61 62 69 6c 69 74 79 | 20 70 75 7a 7a 6c 65 20 |tability| puzzle |
|00001540| 76 65 78 65 73 20 4e 65 | 58 54 27 73 20 64 69 73 |vexes Ne|XT's dis|
|00001550| 74 72 69 62 75 74 65 64 | 20 6f 62 6a 65 63 74 20 |tributed| object |
|00001560| 73 79 73 74 65 6d 20 61 | 73 20 77 65 6c 6c 2c 20 |system a|s well, |
|00001570| 72 65 73 75 6c 74 69 6e | 67 20 69 6e 20 70 72 6f |resultin|g in pro|
|00001580| 62 6c 65 6d 73 20 6c 69 | 6b 65 20 6e 6f 74 20 62 |blems li|ke not b|
|00001590| 65 69 6e 67 20 61 62 6c | 65 20 74 6f 20 72 65 74 |eing abl|e to ret|
|000015a0| 75 72 6e 20 64 6f 75 62 | 6c 65 73 20 66 72 6f 6d |urn doub|les from|
|000015b0| 20 72 65 6d 6f 74 65 20 | 6d 65 73 73 61 67 65 73 | remote |messages|
|000015c0| 2e 0a 0a 54 68 65 20 62 | 65 6e 65 66 69 74 73 20 |...The b|enefits |
|000015d0| 6f 66 20 64 69 73 74 72 | 69 62 75 74 65 64 20 6f |of distr|ibuted o|
|000015e0| 62 6a 65 63 74 73 20 61 | 72 65 20 74 6f 6f 20 67 |bjects a|re too g|
|000015f0| 72 65 61 74 2c 20 74 68 | 6f 75 67 68 2c 20 74 6f |reat, th|ough, to|
|00001600| 20 61 62 61 6e 64 6f 6e | 20 74 68 69 73 20 71 75 | abandon| this qu|
|00001610| 65 73 74 20 69 66 20 69 | 74 20 74 75 72 6e 73 20 |est if i|t turns |
|00001620| 6f 75 74 20 74 68 61 74 | 20 6e 6f 20 31 30 30 25 |out that| no 100%|
|00001630| 20 70 75 72 65 20 73 6f | 6c 75 74 69 6f 6e 20 65 | pure so|lution e|
|00001640| 78 69 73 74 73 2e 20 20 | 4d 6f 72 65 20 70 6f 72 |xists. |More por|
|00001650| 74 61 62 6c 65 20 69 73 | 20 62 65 74 74 65 72 2c |table is| better,|
|00001660| 20 62 75 74 20 49 27 64 | 20 6c 69 6b 65 20 74 6f | but I'd| like to|
|00001670| 20 68 65 61 72 20 61 6e | 79 20 70 72 61 63 74 69 | hear an|y practi|
|00001680| 63 61 6c 20 69 64 65 61 | 73 20 74 68 61 74 20 77 |cal idea|s that w|
|00001690| 69 6c 6c 20 77 6f 72 6b | 20 77 65 6c 6c 20 77 69 |ill work| well wi|
|000016a0| 74 68 20 74 68 65 20 47 | 4e 55 20 63 6f 6d 70 69 |th the G|NU compi|
|000016b0| 6c 65 72 2e 0a 0a 53 6f | 6c 75 74 69 6f 6e 73 3f |ler...So|lutions?|
|000016c0| 20 20 49 64 65 61 73 2c | 20 61 6e 79 6f 6e 65 3f | Ideas,| anyone?|
|000016d0| 0a 0a 54 68 61 6e 6b 73 | 2c 0a 2d 2d 2d 2d 2d 2d |..Thanks|,.------|
|000016e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001700| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001710| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 50 |--------|------.P|
|00001720| 61 75 6c 20 42 75 72 63 | 68 61 72 64 09 3c 62 75 |aul Burc|hard.<bu|
|00001730| 72 63 68 61 72 64 40 67 | 65 6f 6d 2e 75 6d 6e 2e |rchard@g|eom.umn.|
|00001740| 65 64 75 3e 0a 60 60 49 | 27 6d 20 73 74 69 6c 6c |edu>.``I|'m still|
|00001750| 20 6c 65 61 72 6e 69 6e | 67 20 68 6f 77 20 74 6f | learnin|g how to|
|00001760| 20 63 6f 75 6e 74 20 62 | 61 63 6b 77 61 72 64 73 | count b|ackwards|
|00001770| 20 66 72 6f 6d 20 69 6e | 66 69 6e 69 74 79 2e 2e | from in|finity..|
|00001780| 2e 27 27 0a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.''.----|--------|
|00001790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017c0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 0a 0a 0a 44 61 74 65 |--------|....Date|
|000017d0| 3a 20 54 75 65 2c 20 31 | 39 20 4a 61 6e 20 39 33 |: Tue, 1|9 Jan 93|
|000017e0| 20 30 38 3a 30 35 3a 30 | 31 20 2d 30 38 30 30 0a | 08:05:0|1 -0800.|
|000017f0| 46 72 6f 6d 3a 20 44 65 | 6e 6e 69 73 20 47 6c 61 |From: De|nnis Gla|
|00001800| 74 74 69 6e 67 20 3c 64 | 67 6c 61 74 74 69 6e 40 |tting <d|glattin@|
|00001810| 74 72 69 72 65 78 2e 63 | 6f 6d 3e 0a 54 6f 3a 20 |trirex.c|om>.To: |
|00001820| 3c 62 75 72 63 68 61 72 | 64 40 67 65 6f 6d 2e 75 |<burchar|d@geom.u|
|00001830| 6d 6e 2e 65 64 75 3e 0a | 53 75 62 6a 65 63 74 3a |mn.edu>.|Subject:|
|00001840| 20 52 65 3a 20 54 68 65 | 20 66 6f 72 77 61 72 64 | Re: The| forward|
|00001850| 2f 70 65 72 66 6f 72 6d | 76 20 50 75 7a 7a 6c 65 |/perform|v Puzzle|
|00001860| 0a 43 63 3a 20 67 6e 75 | 2d 6f 62 6a 63 40 70 72 |.Cc: gnu|-objc@pr|
|00001870| 65 70 2e 61 69 2e 6d 69 | 74 2e 65 64 75 0a 52 65 |ep.ai.mi|t.edu.Re|
|00001880| 70 6c 79 2d 54 6f 3a 20 | 64 65 6e 6e 69 73 5f 67 |ply-To: |dennis_g|
|00001890| 6c 61 74 74 69 6e 67 40 | 74 72 69 72 65 78 2e 63 |latting@|trirex.c|
|000018a0| 6f 6d 0a 0a 0a 49 20 6c | 6f 6f 6b 65 64 20 61 74 |om...I l|ooked at|
|000018b0| 20 64 6f 69 6e 67 20 66 | 6f 72 77 61 72 64 76 3a | doing f|orwardv:|
|000018c0| 3a 20 66 6f 72 20 74 68 | 65 20 66 69 72 73 74 20 |: for th|e first |
|000018d0| 72 65 6c 65 61 73 65 20 | 6f 66 20 74 68 65 20 72 |release |of the r|
|000018e0| 75 6e 20 74 69 6d 65 2e | 20 20 54 6f 20 69 6d 70 |un time.| To imp|
|000018f0| 6c 65 6d 65 6e 74 20 66 | 6f 72 77 61 72 64 76 3a |lement f|orwardv:|
|00001900| 3a 20 69 73 20 61 20 70 | 65 72 70 6c 65 78 69 6e |: is a p|erplexin|
|00001910| 67 20 70 72 6f 62 6c 65 | 6d 3a 20 20 0a 0a 2a 20 |g proble|m: ..* |
|00001920| 49 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 6f |Implemen|tation o|
|00001930| 66 20 66 6f 72 77 61 72 | 64 76 3a 3a 20 77 6f 75 |f forwar|dv:: wou|
|00001940| 6c 64 20 72 65 71 75 69 | 72 65 20 73 74 61 63 6b |ld requi|re stack|
|00001950| 20 66 72 61 6d 65 20 63 | 6f 70 79 69 6e 67 2e 20 | frame c|opying. |
|00001960| 20 28 6f 72 20 61 74 20 | 6c 65 61 73 74 20 6d 6f | (or at |least mo|
|00001970| 64 69 66 69 63 61 74 69 | 6f 6e 20 6f 66 20 74 68 |dificati|on of th|
|00001980| 65 20 65 78 69 73 74 69 | 6e 67 20 73 74 61 63 6b |e existi|ng stack|
|00001990| 20 66 72 61 6d 65 2e 29 | 0a 2a 20 54 68 65 20 6d | frame.)|.* The m|
|000019a0| 69 63 72 6f 70 72 6f 63 | 65 73 73 6f 72 20 69 74 |icroproc|essor it|
|000019b0| 73 65 6c 66 20 70 6f 73 | 65 73 20 70 72 6f 62 6c |self pos|es probl|
|000019c0| 65 6d 73 20 73 75 63 68 | 20 61 73 20 77 6f 72 64 |ems such| as word|
|000019d0| 20 77 69 64 74 68 2c 20 | 61 6c 69 67 6e 6d 65 6e | width, |alignmen|
|000019e0| 74 2c 20 61 6e 64 20 2d | 2d 20 70 6f 73 73 69 62 |t, and -|- possib|
|000019f0| 6c 79 20 6f 6e 20 73 6f | 6d 65 20 52 49 53 43 20 |ly on so|me RISC |
|00001a00| 6d 61 63 68 69 6e 65 73 | 20 2d 2d 20 70 61 72 61 |machines| -- para|
|00001a10| 6d 65 74 65 72 20 70 61 | 73 73 69 6e 67 20 75 73 |meter pa|ssing us|
|00001a20| 69 6e 67 20 72 65 67 69 | 73 74 65 72 20 77 69 6e |ing regi|ster win|
|00001a30| 64 6f 77 73 2e 0a 2a 20 | 45 61 63 68 20 66 75 6e |dows..* |Each fun|
|00001a40| 63 74 69 6f 6e 20 75 73 | 65 64 20 74 6f 20 69 6d |ction us|ed to im|
|00001a50| 70 6c 65 6d 65 6e 74 20 | 66 6f 72 77 61 72 64 76 |plement |forwardv|
|00001a60| 3a 3a 20 6d 61 79 20 6e | 65 65 64 20 74 6f 20 6b |:: may n|eed to k|
|00001a70| 6e 6f 77 20 74 68 65 20 | 61 6d 6f 75 6e 74 20 6f |now the |amount o|
|00001a80| 66 20 64 61 74 61 20 70 | 75 73 68 65 64 20 6f 6e |f data p|ushed on|
|00001a90| 74 6f 20 74 68 65 20 73 | 74 61 63 6b 20 66 6f 72 |to the s|tack for|
|00001aa0| 20 6c 6f 63 61 6c 20 76 | 61 72 69 61 62 6c 65 73 | local v|ariables|
|00001ab0| 2e 20 20 28 53 6f 20 74 | 6f 20 69 6e 64 65 78 20 |. (So t|o index |
|00001ac0| 62 61 63 6b 77 61 72 64 | 2e 29 0a 2a 20 54 68 65 |backward|.).* The|
|00001ad0| 20 64 69 73 70 61 74 63 | 68 20 66 75 6e 63 74 69 | dispatc|h functi|
|00001ae0| 6f 6e 20 6d 75 73 74 20 | 6b 6e 6f 77 20 61 62 6f |on must |know abo|
|00001af0| 75 74 20 70 61 73 73 65 | 64 20 61 72 67 75 6d 65 |ut passe|d argume|
|00001b00| 6e 74 73 2e 20 20 57 68 | 69 6c 65 20 74 68 69 73 |nts. Wh|ile this|
|00001b10| 20 69 73 20 65 6e 63 6f | 64 65 64 20 61 6e 64 20 | is enco|ded and |
|00001b20| 61 76 61 69 6c 61 62 6c | 65 2c 20 77 68 61 74 20 |availabl|e, what |
|00001b30| 64 6f 20 79 6f 75 20 64 | 6f 20 66 6f 72 20 76 61 |do you d|o for va|
|00001b40| 72 69 61 62 6c 65 20 61 | 72 67 75 6d 65 6e 74 73 |riable a|rguments|
|00001b50| 20 61 6e 64 20 73 74 72 | 75 63 74 75 72 65 73 3f | and str|uctures?|
|00001b60| 20 20 4f 68 20 79 65 61 | 2c 20 68 6f 77 20 61 62 | Oh yea|, how ab|
|00001b70| 6f 75 74 20 76 6f 69 64 | 2a 3f 0a 2a 20 54 68 65 |out void|*?.* The|
|00001b80| 20 73 74 61 63 6b 20 6d | 75 73 74 20 62 65 20 69 | stack m|ust be i|
|00001b90| 6e 64 65 78 65 64 20 74 | 6f 20 65 78 74 72 61 63 |ndexed t|o extrac|
|00001ba0| 74 20 72 65 74 75 72 6e | 20 61 64 64 72 65 73 73 |t return| address|
|00001bb0| 65 73 20 2d 2d 20 74 68 | 61 74 20 69 73 2c 20 69 |es -- th|at is, i|
|00001bc0| 66 20 74 68 69 73 20 63 | 61 6e 20 62 65 20 64 6f |f this c|an be do|
|00001bd0| 6e 65 20 77 69 74 68 20 | 79 6f 75 72 20 6d 69 63 |ne with |your mic|
|00001be0| 72 6f 70 72 6f 63 65 73 | 73 6f 72 20 6f 66 20 74 |roproces|sor of t|
|00001bf0| 68 65 20 64 61 79 2e 20 | 20 54 68 65 72 65 20 61 |he day. | There a|
|00001c00| 72 65 20 61 6c 73 6f 20 | 6d 69 63 72 6f 70 72 6f |re also |micropro|
|00001c10| 63 65 73 73 6f 72 2f 63 | 6f 6d 70 69 6c 65 72 20 |cessor/c|ompiler |
|00001c20| 73 70 65 63 69 66 69 63 | 20 64 61 74 61 20 70 75 |specific| data pu|
|00001c30| 73 68 65 64 20 6f 6e 74 | 6f 20 74 68 65 20 73 74 |shed ont|o the st|
|00001c40| 61 63 6b 20 74 68 61 74 | 20 74 68 65 20 66 75 6e |ack that| the fun|
|00001c50| 63 74 69 6f 6e 73 20 6d | 61 79 20 6e 65 65 64 20 |ctions m|ay need |
|00001c60| 74 6f 20 6b 6e 6f 77 20 | 61 62 6f 75 74 20 73 75 |to know |about su|
|00001c70| 63 68 20 61 73 20 74 68 | 65 20 76 61 72 69 61 62 |ch as th|e variab|
|00001c80| 6c 65 20 66 72 61 6d 65 | 20 6f 6e 20 36 38 30 78 |le frame| on 680x|
|00001c90| 30 20 6d 69 63 72 6f 70 | 72 6f 63 65 73 73 6f 72 |0 microp|rocessor|
|00001ca0| 73 20 28 6e 6f 74 65 20 | 74 68 65 20 6c 69 6e 6b |s (note |the link|
|00001cb0| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 20 6f 6e 20 | instruc|tion on |
|00001cc0| 65 61 63 68 20 66 75 6e | 63 74 69 6f 6e 20 65 6e |each fun|ction en|
|00001cd0| 74 72 79 29 2e 0a 0a 41 | 74 20 74 68 65 20 74 69 |try)...A|t the ti|
|00001ce0| 6d 65 2c 20 74 68 65 73 | 65 20 69 73 73 75 65 73 |me, thes|e issues|
|00001cf0| 20 61 6e 64 20 6f 74 68 | 65 72 73 20 49 20 68 61 | and oth|ers I ha|
|00001d00| 76 65 6e 27 74 20 6d 65 | 6e 74 69 6f 6e 65 64 20 |ven't me|ntioned |
|00001d10| 63 61 75 73 65 64 20 6d | 65 20 74 68 69 6e 6b 20 |caused m|e think |
|00001d20| 74 68 61 74 20 44 4f 20 | 72 65 65 6b 73 20 6f 66 |that DO |reeks of|
|00001d30| 20 61 73 73 65 6d 62 6c | 79 20 63 6f 64 65 20 74 | assembl|y code t|
|00001d40| 68 61 74 20 69 73 20 6e | 6f 74 20 6f 6e 6c 79 20 |hat is n|ot only |
|00001d50| 74 61 69 6c 6f 72 65 64 | 20 74 6f 20 74 68 65 20 |tailored| to the |
|00001d60| 6d 69 63 72 6f 70 72 6f | 63 65 73 73 6f 72 2c 20 |micropro|cessor, |
|00001d70| 62 79 20 74 68 65 20 76 | 65 6e 64 6f 72 27 73 20 |by the v|endor's |
|00001d80| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00001d90| 20 61 73 20 77 65 6c 6c | 2e 20 20 54 68 69 73 20 | as well|. This |
|00001da0| 69 73 20 61 20 73 69 67 | 6e 69 66 69 63 61 6e 74 |is a sig|nificant|
|00001db0| 20 6d 61 69 6e 74 65 6e | 61 6e 63 65 20 69 73 73 | mainten|ance iss|
|00001dc0| 75 65 20 61 6e 64 20 69 | 73 20 69 6e 20 6e 6f 20 |ue and i|s in no |
|00001dd0| 77 61 79 20 70 6f 72 74 | 61 62 6c 65 2e 0a 0a 54 |way port|able...T|
|00001de0| 68 65 20 6f 74 68 65 72 | 20 69 74 65 6d 20 49 20 |he other| item I |
|00001df0| 77 61 6e 74 65 64 20 74 | 6f 20 61 64 64 20 74 6f |wanted t|o add to|
|00001e00| 20 74 68 65 20 72 75 6e | 20 74 69 6d 65 20 69 73 | the run| time is|
|00001e10| 20 22 61 63 74 69 76 65 | 20 6f 62 6a 65 63 74 73 | "active| objects|
|00001e20| 22 20 62 75 74 20 69 74 | 20 73 75 66 66 65 72 73 |" but it| suffers|
|00001e30| 20 66 72 6f 6d 20 6d 61 | 6e 79 20 6f 66 20 74 68 | from ma|ny of th|
|00001e40| 65 20 73 61 6d 65 20 69 | 73 73 75 65 73 2e 0a 0a |e same i|ssues...|
|00001e50| 49 20 74 68 69 6e 6b 20 | 79 6f 75 20 74 6f 75 63 |I think |you touc|
|00001e60| 68 65 64 20 6f 6e 20 73 | 6f 6d 65 74 68 69 6e 67 |hed on s|omething|
|00001e70| 20 49 20 73 75 73 70 65 | 63 74 20 61 62 6f 75 74 | I suspe|ct about|
|00001e80| 20 74 68 65 20 4e 65 58 | 54 20 72 75 6e 20 74 69 | the NeX|T run ti|
|00001e90| 6d 65 3a 20 20 69 74 20 | 63 6f 6e 74 61 69 6e 73 |me: it |contains|
|00001ea0| 20 6d 69 63 72 6f 70 72 | 6f 63 65 73 73 6f 72 2f | micropr|ocessor/|
|00001eb0| 76 65 6e 64 6f 72 20 73 | 70 65 63 69 66 69 63 20 |vendor s|pecific |
|00001ec0| 61 73 73 65 6d 62 6c 79 | 20 63 6f 64 65 2e 0a 0a |assembly| code...|
|00001ed0| 49 20 69 6e 76 69 74 65 | 20 69 64 65 61 73 20 6f |I invite| ideas o|
|00001ee0| 66 20 68 6f 77 20 74 6f | 20 64 6f 20 74 68 69 73 |f how to| do this|
|00001ef0| 20 69 6e 20 61 20 73 6f | 6d 65 77 68 61 74 20 70 | in a so|mewhat p|
|00001f00| 6f 72 74 61 62 6c 65 20 | 66 61 73 68 69 6f 6e 2e |ortable |fashion.|
|00001f10| 20 20 50 6f 72 74 61 62 | 69 6c 69 74 79 20 77 61 | Portab|ility wa|
|00001f20| 73 20 6f 6e 65 20 6f 66 | 20 74 68 65 20 63 68 69 |s one of| the chi|
|00001f30| 65 66 20 67 6f 61 6c 73 | 20 6f 66 20 74 68 65 20 |ef goals| of the |
|00001f40| 72 75 6e 20 74 69 6d 65 | 2e 0a 0a 0a 2d 64 70 67 |run time|....-dpg|
|00001f50| 0a 0a 0a 0a 0a 46 72 6f | 6d 3a 20 53 74 65 76 65 |.....Fro|m: Steve|
|00001f60| 20 4e 61 72 6f 66 66 20 | 3c 53 74 65 76 65 5f 4e | Naroff |<Steve_N|
|00001f70| 61 72 6f 66 66 40 6e 65 | 78 74 2e 63 6f 6d 3e 0a |aroff@ne|xt.com>.|
|00001f80| 44 61 74 65 3a 20 54 75 | 65 2c 20 31 39 20 4a 61 |Date: Tu|e, 19 Ja|
|00001f90| 6e 20 39 33 20 31 37 3a | 35 30 3a 32 34 20 2d 30 |n 93 17:|50:24 -0|
|00001fa0| 38 30 30 0a 54 6f 3a 20 | 64 65 6e 6e 69 73 5f 67 |800.To: |dennis_g|
|00001fb0| 6c 61 74 74 69 6e 67 40 | 74 72 69 72 65 78 2e 63 |latting@|trirex.c|
|00001fc0| 6f 6d 0a 53 75 62 6a 65 | 63 74 3a 20 54 68 65 20 |om.Subje|ct: The |
|00001fd0| 66 6f 72 77 61 72 64 2f | 70 65 72 66 6f 72 6d 76 |forward/|performv|
|00001fe0| 20 50 75 7a 7a 6c 65 0a | 43 63 3a 20 67 6e 75 2d | Puzzle.|Cc: gnu-|
|00001ff0| 6f 62 6a 63 40 70 72 65 | 70 2e 61 69 2e 6d 69 74 |objc@pre|p.ai.mit|
|00002000| 2e 65 64 75 0a 0a 0a 54 | 68 65 20 22 73 74 79 6c |.edu...T|he "styl|
|00002010| 65 22 20 6f 66 20 66 6f | 72 77 61 72 64 69 6e 67 |e" of fo|rwarding|
|00002020| 20 72 65 71 75 69 72 65 | 64 20 66 6f 72 20 44 4f | require|d for DO|
|00002030| 20 69 73 20 68 61 72 64 | 20 74 6f 20 64 6f 20 69 | is hard| to do i|
|00002040| 6e 20 70 6f 72 74 61 62 | 6c 65 20 77 61 79 20 28 |n portab|le way (|
|00002050| 67 69 76 65 6e 20 74 68 | 65 20 6c 6f 77 20 6c 65 |given th|e low le|
|00002060| 76 65 6c 20 6e 61 74 75 | 72 65 20 6f 66 20 43 29 |vel natu|re of C)|
|00002070| 2e 20 43 20 63 6f 6d 70 | 69 6c 65 72 73 20 68 61 |. C comp|ilers ha|
|00002080| 76 65 20 61 20 68 61 72 | 64 20 65 6e 6f 75 67 68 |ve a har|d enough|
|00002090| 20 74 69 6d 65 20 61 67 | 72 65 65 69 6e 67 20 6f | time ag|reeing o|
|000020a0| 6e 20 73 74 72 75 63 74 | 75 72 65 20 6c 61 79 6f |n struct|ure layo|
|000020b0| 75 74 21 20 4e 65 76 65 | 72 74 68 65 6c 65 73 73 |ut! Neve|rtheless|
|000020c0| 2c 20 49 20 62 65 6c 69 | 65 76 65 20 79 6f 75 20 |, I beli|eve you |
|000020d0| 61 72 65 20 6f 76 65 72 | 20 65 73 74 69 6d 61 74 |are over| estimat|
|000020e0| 69 6e 67 20 74 68 65 20 | 61 73 73 65 6d 62 6c 79 |ing the |assembly|
|000020f0| 20 72 65 71 75 69 72 65 | 64 20 69 6d 70 6c 65 6d | require|d implem|
|00002100| 65 6e 74 20 74 68 69 73 | 2e 20 54 68 65 20 74 77 |ent this|. The tw|
|00002110| 6f 20 68 6f 6f 6b 73 20 | 69 6e 20 74 68 65 20 4e |o hooks |in the N|
|00002120| 65 58 54 20 72 75 6e 74 | 69 6d 65 20 74 68 61 74 |eXT runt|ime that|
|00002130| 20 73 75 70 70 6f 72 74 | 20 66 6f 72 77 61 72 64 | support| forward|
|00002140| 69 6e 67 20 61 72 65 3a | 0a 0a 65 78 74 65 72 6e |ing are:|..extern|
|00002150| 20 69 64 20 5f 6f 62 6a | 63 5f 6d 73 67 46 6f 72 | id _obj|c_msgFor|
|00002160| 77 61 72 64 20 28 69 64 | 20 73 65 6c 66 2c 20 53 |ward (id| self, S|
|00002170| 45 4c 20 73 65 6c 2c 20 | 2e 2e 2e 29 3b 0a 65 78 |EL sel, |...);.ex|
|00002180| 74 65 72 6e 20 69 64 20 | 6f 62 6a 63 5f 6d 73 67 |tern id |objc_msg|
|00002190| 53 65 6e 64 76 20 28 69 | 64 20 73 65 6c 66 2c 20 |Sendv (i|d self, |
|000021a0| 53 45 4c 20 6f 70 2c 0a | 09 09 75 6e 73 69 67 6e |SEL op,.|..unsign|
|000021b0| 65 64 20 61 72 67 5f 73 | 69 7a 65 2c 20 6d 61 72 |ed arg_s|ize, mar|
|000021c0| 67 5f 6c 69 73 74 20 61 | 72 67 5f 66 72 61 6d 65 |g_list a|rg_frame|
|000021d0| 29 3b 0a 0a 54 68 65 20 | 61 73 73 65 6d 62 6c 79 |);..The |assembly|
|000021e0| 20 63 6f 64 65 20 61 6d | 6f 75 6e 74 73 20 74 6f | code am|ounts to|
|000021f0| 20 6c 65 73 73 20 74 68 | 61 6e 20 31 20 70 61 67 | less th|an 1 pag|
|00002200| 65 20 66 6f 72 20 62 6f | 74 68 20 6f 66 20 74 68 |e for bo|th of th|
|00002210| 65 73 65 20 72 6f 75 74 | 69 6e 65 73 20 28 6c 65 |ese rout|ines (le|
|00002220| 74 20 6d 65 20 6b 6e 6f | 77 20 69 66 20 79 6f 75 |t me kno|w if you|
|00002230| 20 77 61 6e 74 20 74 68 | 65 20 63 6f 64 65 29 2e | want th|e code).|
|00002240| 0a 0a 59 6f 75 20 63 6f | 75 6c 64 20 69 6d 61 67 |..You co|uld imag|
|00002250| 69 6e 65 20 61 20 73 74 | 79 6c 65 20 6f 66 20 66 |ine a st|yle of f|
|00002260| 6f 72 77 61 72 64 69 6e | 67 20 74 68 61 74 20 77 |orwardin|g that w|
|00002270| 6f 72 6b 73 20 66 69 6e | 65 20 6c 6f 63 61 6c 6c |orks fin|e locall|
|00002280| 79 20 28 61 6e 64 20 69 | 73 20 74 6f 74 61 6c 6c |y (and i|s totall|
|00002290| 79 20 70 6f 72 74 61 62 | 6c 65 29 2e 20 54 68 65 |y portab|le). The|
|000022a0| 20 69 6e 74 65 72 66 61 | 63 65 20 69 73 3a 0a 0a | interfa|ce is:..|
|000022b0| 2d 20 66 6f 72 77 61 72 | 64 3a 28 53 45 4c 29 6f |- forwar|d:(SEL)o|
|000022c0| 70 3b 09 2f 2f 20 61 64 | 65 71 75 61 74 65 20 66 |p;.// ad|equate f|
|000022d0| 6f 72 20 73 75 70 70 6f | 72 74 69 6e 67 20 64 65 |or suppo|rting de|
|000022e0| 6c 65 67 61 74 69 6f 6e | 2e 0a 0a 22 66 6f 72 77 |legation|..."forw|
|000022f0| 61 72 64 3a 22 20 77 6f | 75 6c 64 20 62 65 20 69 |ard:" wo|uld be i|
|00002300| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 62 79 20 61 6e |mplement|ed by an|
|00002310| 79 20 63 6c 61 73 73 20 | 69 6e 74 65 72 65 73 74 |y class |interest|
|00002320| 65 64 20 69 6e 20 70 72 | 6f 76 69 64 69 6e 67 20 |ed in pr|oviding |
|00002330| 61 20 64 65 6c 65 67 61 | 74 65 2e 20 49 74 20 77 |a delega|te. It w|
|00002340| 6f 75 6c 64 20 6e 6f 74 | 20 62 65 20 64 69 72 65 |ould not| be dire|
|00002350| 63 74 6c 79 20 72 65 73 | 70 6f 6e 73 69 62 6c 65 |ctly res|ponsible|
|00002360| 20 66 6f 72 20 73 65 6e | 64 69 6e 67 20 74 68 65 | for sen|ding the|
|00002370| 20 6d 65 73 73 61 67 65 | 20 28 77 68 69 63 68 20 | message| (which |
|00002380| 69 73 20 77 68 79 20 69 | 74 20 69 73 20 6d 6f 72 |is why i|t is mor|
|00002390| 65 20 70 6f 72 74 61 62 | 6c 65 29 2e 20 54 68 69 |e portab|le). Thi|
|000023a0| 73 20 69 73 20 61 6c 73 | 6f 20 70 61 72 61 6c 6c |s is als|o parall|
|000023b0| 65 6c 20 77 69 74 68 20 | 74 68 65 20 77 61 79 20 |el with |the way |
|000023c0| 79 6f 75 20 73 65 70 61 | 72 61 74 65 20 22 6c 6f |you sepa|rate "lo|
|000023d0| 6f 6b 75 70 20 66 72 6f | 6d 20 64 69 73 70 61 74 |okup fro|m dispat|
|000023e0| 63 68 22 20 69 6e 20 74 | 68 65 20 47 4e 55 20 72 |ch" in t|he GNU r|
|000023f0| 75 6e 74 69 6d 65 2e 0a | 0a 72 65 67 61 72 64 73 |untime..|.regards|
|00002400| 2c 20 73 6e 61 72 6f 66 | 66 2e 0a 0a 42 65 67 69 |, snarof|f...Begi|
|00002410| 6e 20 66 6f 72 77 61 72 | 64 65 64 20 6d 65 73 73 |n forwar|ded mess|
|00002420| 61 67 65 3a 0a 0a 44 61 | 74 65 3a 20 54 75 65 2c |age:..Da|te: Tue,|
|00002430| 20 31 39 20 4a 61 6e 20 | 39 33 20 30 38 3a 30 35 | 19 Jan |93 08:05|
|00002440| 3a 30 31 20 2d 30 38 30 | 30 0a 46 72 6f 6d 3a 20 |:01 -080|0.From: |
|00002450| 44 65 6e 6e 69 73 20 47 | 6c 61 74 74 69 6e 67 20 |Dennis G|latting |
|00002460| 3c 64 67 6c 61 74 74 69 | 6e 40 74 72 69 72 65 78 |<dglatti|n@trirex|
|00002470| 2e 63 6f 6d 3e 0a 54 6f | 3a 20 3c 62 75 72 63 68 |.com>.To|: <burch|
|00002480| 61 72 64 40 67 65 6f 6d | 2e 75 6d 6e 2e 65 64 75 |ard@geom|.umn.edu|
|00002490| 3e 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 54 |>.Subjec|t: Re: T|
|000024a0| 68 65 20 66 6f 72 77 61 | 72 64 2f 70 65 72 66 6f |he forwa|rd/perfo|
|000024b0| 72 6d 76 20 50 75 7a 7a | 6c 65 0a 43 63 3a 20 67 |rmv Puzz|le.Cc: g|
|000024c0| 6e 75 2d 6f 62 6a 63 40 | 70 72 65 70 2e 61 69 2e |nu-objc@|prep.ai.|
|000024d0| 6d 69 74 2e 65 64 75 0a | 52 65 70 6c 79 2d 54 6f |mit.edu.|Reply-To|
|000024e0| 3a 20 64 65 6e 6e 69 73 | 5f 67 6c 61 74 74 69 6e |: dennis|_glattin|
|000024f0| 67 40 74 72 69 72 65 78 | 2e 63 6f 6d 0a 0a 0a 49 |g@trirex|.com...I|
|00002500| 20 6c 6f 6f 6b 65 64 20 | 61 74 20 64 6f 69 6e 67 | looked |at doing|
|00002510| 20 66 6f 72 77 61 72 64 | 76 3a 3a 20 66 6f 72 20 | forward|v:: for |
|00002520| 74 68 65 20 66 69 72 73 | 74 20 72 65 6c 65 61 73 |the firs|t releas|
|00002530| 65 20 6f 66 20 74 68 65 | 20 72 75 6e 20 74 69 6d |e of the| run tim|
|00002540| 65 2e 20 20 54 6f 20 69 | 6d 70 6c 65 6d 65 6e 74 |e. To i|mplement|
|00002550| 20 66 6f 72 77 61 72 64 | 76 3a 3a 20 69 73 20 61 | forward|v:: is a|
|00002560| 20 70 65 72 70 6c 65 78 | 69 6e 67 20 70 72 6f 62 | perplex|ing prob|
|00002570| 6c 65 6d 3a 20 0a 0a 2a | 20 49 6d 70 6c 65 6d 65 |lem: ..*| Impleme|
|00002580| 6e 74 61 74 69 6f 6e 20 | 6f 66 20 66 6f 72 77 61 |ntation |of forwa|
|00002590| 72 64 76 3a 3a 20 77 6f | 75 6c 64 20 72 65 71 75 |rdv:: wo|uld requ|
|000025a0| 69 72 65 20 73 74 61 63 | 6b 20 66 72 61 6d 65 20 |ire stac|k frame |
|000025b0| 63 6f 70 79 69 6e 67 2e | 20 20 28 6f 72 20 61 74 |copying.| (or at|
|000025c0| 20 6c 65 61 73 74 20 6d | 6f 64 69 66 69 63 61 74 | least m|odificat|
|000025d0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 65 78 69 73 74 |ion of t|he exist|
|000025e0| 69 6e 67 20 73 74 61 63 | 6b 20 66 72 61 6d 65 2e |ing stac|k frame.|
|000025f0| 29 0a 2a 20 54 68 65 20 | 6d 69 63 72 6f 70 72 6f |).* The |micropro|
|00002600| 63 65 73 73 6f 72 20 69 | 74 73 65 6c 66 20 70 6f |cessor i|tself po|
|00002610| 73 65 73 20 70 72 6f 62 | 6c 65 6d 73 20 73 75 63 |ses prob|lems suc|
|00002620| 68 20 61 73 20 77 6f 72 | 64 20 77 69 64 74 68 2c |h as wor|d width,|
|00002630| 20 61 6c 69 67 6e 6d 65 | 6e 74 2c 20 61 6e 64 20 | alignme|nt, and |
|00002640| 2d 2d 20 70 6f 73 73 69 | 62 6c 79 20 6f 6e 20 73 |-- possi|bly on s|
|00002650| 6f 6d 65 20 52 49 53 43 | 20 6d 61 63 68 69 6e 65 |ome RISC| machine|
|00002660| 73 20 2d 2d 20 70 61 72 | 61 6d 65 74 65 72 20 70 |s -- par|ameter p|
|00002670| 61 73 73 69 6e 67 20 75 | 73 69 6e 67 20 72 65 67 |assing u|sing reg|
|00002680| 69 73 74 65 72 20 77 69 | 6e 64 6f 77 73 2e 0a 2a |ister wi|ndows..*|
|00002690| 20 45 61 63 68 20 66 75 | 6e 63 74 69 6f 6e 20 75 | Each fu|nction u|
|000026a0| 73 65 64 20 74 6f 20 69 | 6d 70 6c 65 6d 65 6e 74 |sed to i|mplement|
|000026b0| 20 66 6f 72 77 61 72 64 | 76 3a 3a 20 6d 61 79 20 | forward|v:: may |
|000026c0| 6e 65 65 64 20 74 6f 20 | 6b 6e 6f 77 20 74 68 65 |need to |know the|
|000026d0| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 64 61 74 61 20 | amount |of data |
|000026e0| 70 75 73 68 65 64 20 6f | 6e 74 6f 20 74 68 65 20 |pushed o|nto the |
|000026f0| 73 74 61 63 6b 20 66 6f | 72 20 6c 6f 63 61 6c 20 |stack fo|r local |
|00002700| 76 61 72 69 61 62 6c 65 | 73 2e 20 20 28 53 6f 20 |variable|s. (So |
|00002710| 74 6f 20 69 6e 64 65 78 | 20 62 61 63 6b 77 61 72 |to index| backwar|
|00002720| 64 2e 29 0a 2a 20 54 68 | 65 20 64 69 73 70 61 74 |d.).* Th|e dispat|
|00002730| 63 68 20 66 75 6e 63 74 | 69 6f 6e 20 6d 75 73 74 |ch funct|ion must|
|00002740| 20 6b 6e 6f 77 20 61 62 | 6f 75 74 20 70 61 73 73 | know ab|out pass|
|00002750| 65 64 20 61 72 67 75 6d | 65 6e 74 73 2e 20 20 57 |ed argum|ents. W|
|00002760| 68 69 6c 65 20 74 68 69 | 73 20 69 73 20 65 6e 63 |hile thi|s is enc|
|00002770| 6f 64 65 64 20 61 6e 64 | 20 61 76 61 69 6c 61 62 |oded and| availab|
|00002780| 6c 65 2c 20 77 68 61 74 | 20 64 6f 20 79 6f 75 20 |le, what| do you |
|00002790| 64 6f 20 66 6f 72 20 76 | 61 72 69 61 62 6c 65 20 |do for v|ariable |
|000027a0| 61 72 67 75 6d 65 6e 74 | 73 20 61 6e 64 20 73 74 |argument|s and st|
|000027b0| 72 75 63 74 75 72 65 73 | 3f 20 20 4f 68 20 79 65 |ructures|? Oh ye|
|000027c0| 61 2c 20 68 6f 77 20 61 | 62 6f 75 74 20 76 6f 69 |a, how a|bout voi|
|000027d0| 64 2a 3f 0a 2a 20 54 68 | 65 20 73 74 61 63 6b 20 |d*?.* Th|e stack |
|000027e0| 6d 75 73 74 20 62 65 20 | 69 6e 64 65 78 65 64 20 |must be |indexed |
|000027f0| 74 6f 20 65 78 74 72 61 | 63 74 20 72 65 74 75 72 |to extra|ct retur|
|00002800| 6e 20 61 64 64 72 65 73 | 73 65 73 20 2d 2d 20 74 |n addres|ses -- t|
|00002810| 68 61 74 20 69 73 2c 20 | 69 66 20 74 68 69 73 20 |hat is, |if this |
|00002820| 63 61 6e 20 62 65 20 64 | 6f 6e 65 20 77 69 74 68 |can be d|one with|
|00002830| 20 79 6f 75 72 20 6d 69 | 63 72 6f 70 72 6f 63 65 | your mi|croproce|
|00002840| 73 73 6f 72 20 6f 66 20 | 74 68 65 20 64 61 79 2e |ssor of |the day.|
|00002850| 20 20 54 68 65 72 65 20 | 61 72 65 20 61 6c 73 6f | There |are also|
|00002860| 20 6d 69 63 72 6f 70 72 | 6f 63 65 73 73 6f 72 2f | micropr|ocessor/|
|00002870| 63 6f 6d 70 69 6c 65 72 | 20 73 70 65 63 69 66 69 |compiler| specifi|
|00002880| 63 20 64 61 74 61 20 70 | 75 73 68 65 64 20 6f 6e |c data p|ushed on|
|00002890| 74 6f 20 74 68 65 20 73 | 74 61 63 6b 20 74 68 61 |to the s|tack tha|
|000028a0| 74 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |t the fu|nctions |
|000028b0| 6d 61 79 20 6e 65 65 64 | 20 74 6f 20 6b 6e 6f 77 |may need| to know|
|000028c0| 20 61 62 6f 75 74 20 73 | 75 63 68 20 61 73 20 74 | about s|uch as t|
|000028d0| 68 65 20 76 61 72 69 61 | 62 6c 65 20 66 72 61 6d |he varia|ble fram|
|000028e0| 65 20 6f 6e 20 36 38 30 | 78 30 20 6d 69 63 72 6f |e on 680|x0 micro|
|000028f0| 70 72 6f 63 65 73 73 6f | 72 73 20 28 6e 6f 74 65 |processo|rs (note|
|00002900| 20 74 68 65 20 6c 69 6e | 6b 20 69 6e 73 74 72 75 | the lin|k instru|
|00002910| 63 74 69 6f 6e 20 6f 6e | 20 65 61 63 68 20 66 75 |ction on| each fu|
|00002920| 6e 63 74 69 6f 6e 20 65 | 6e 74 72 79 29 2e 0a 0a |nction e|ntry)...|
|00002930| 41 74 20 74 68 65 20 74 | 69 6d 65 2c 20 74 68 65 |At the t|ime, the|
|00002940| 73 65 20 69 73 73 75 65 | 73 20 61 6e 64 20 6f 74 |se issue|s and ot|
|00002950| 68 65 72 73 20 49 20 68 | 61 76 65 6e 27 74 20 6d |hers I h|aven't m|
|00002960| 65 6e 74 69 6f 6e 65 64 | 20 63 61 75 73 65 64 20 |entioned| caused |
|00002970| 6d 65 20 74 68 69 6e 6b | 20 74 68 61 74 20 44 4f |me think| that DO|
|00002980| 20 72 65 65 6b 73 20 6f | 66 20 61 73 73 65 6d 62 | reeks o|f assemb|
|00002990| 6c 79 20 63 6f 64 65 20 | 74 68 61 74 20 69 73 20 |ly code |that is |
|000029a0| 6e 6f 74 20 6f 6e 6c 79 | 20 74 61 69 6c 6f 72 65 |not only| tailore|
|000029b0| 64 20 74 6f 20 74 68 65 | 20 6d 69 63 72 6f 70 72 |d to the| micropr|
|000029c0| 6f 63 65 73 73 6f 72 2c | 20 62 79 20 74 68 65 20 |ocessor,| by the |
|000029d0| 76 65 6e 64 6f 72 27 73 | 20 6f 70 65 72 61 74 69 |vendor's| operati|
|000029e0| 6e 67 20 73 79 73 74 65 | 6d 20 61 73 20 77 65 6c |ng syste|m as wel|
|000029f0| 6c 2e 20 20 54 68 69 73 | 20 69 73 20 61 20 73 69 |l. This| is a si|
|00002a00| 67 6e 69 66 69 63 61 6e | 74 20 6d 61 69 6e 74 65 |gnifican|t mainte|
|00002a10| 6e 61 6e 63 65 20 69 73 | 73 75 65 20 61 6e 64 20 |nance is|sue and |
|00002a20| 69 73 20 69 6e 20 6e 6f | 20 77 61 79 20 70 6f 72 |is in no| way por|
|00002a30| 74 61 62 6c 65 2e 0a 0a | 54 68 65 20 6f 74 68 65 |table...|The othe|
|00002a40| 72 20 69 74 65 6d 20 49 | 20 77 61 6e 74 65 64 20 |r item I| wanted |
|00002a50| 74 6f 20 61 64 64 20 74 | 6f 20 74 68 65 20 72 75 |to add t|o the ru|
|00002a60| 6e 20 74 69 6d 65 20 69 | 73 20 22 61 63 74 69 76 |n time i|s "activ|
|00002a70| 65 20 6f 62 6a 65 63 74 | 73 22 20 62 75 74 20 69 |e object|s" but i|
|00002a80| 74 20 73 75 66 66 65 72 | 73 20 66 72 6f 6d 20 6d |t suffer|s from m|
|00002a90| 61 6e 79 20 6f 66 20 74 | 68 65 20 73 61 6d 65 20 |any of t|he same |
|00002aa0| 69 73 73 75 65 73 2e 0a | 0a 49 20 74 68 69 6e 6b |issues..|.I think|
|00002ab0| 20 79 6f 75 20 74 6f 75 | 63 68 65 64 20 6f 6e 20 | you tou|ched on |
|00002ac0| 73 6f 6d 65 74 68 69 6e | 67 20 49 20 73 75 73 70 |somethin|g I susp|
|00002ad0| 65 63 74 20 61 62 6f 75 | 74 20 74 68 65 20 4e 65 |ect abou|t the Ne|
|00002ae0| 58 54 20 72 75 6e 20 74 | 69 6d 65 3a 20 20 69 74 |XT run t|ime: it|
|00002af0| 20 63 6f 6e 74 61 69 6e | 73 20 6d 69 63 72 6f 70 | contain|s microp|
|00002b00| 72 6f 63 65 73 73 6f 72 | 2f 76 65 6e 64 6f 72 20 |rocessor|/vendor |
|00002b10| 73 70 65 63 69 66 69 63 | 20 61 73 73 65 6d 62 6c |specific| assembl|
|00002b20| 79 20 63 6f 64 65 2e 0a | 0a 49 20 69 6e 76 69 74 |y code..|.I invit|
|00002b30| 65 20 69 64 65 61 73 20 | 6f 66 20 68 6f 77 20 74 |e ideas |of how t|
|00002b40| 6f 20 64 6f 20 74 68 69 | 73 20 69 6e 20 61 20 73 |o do thi|s in a s|
|00002b50| 6f 6d 65 77 68 61 74 20 | 70 6f 72 74 61 62 6c 65 |omewhat |portable|
|00002b60| 20 66 61 73 68 69 6f 6e | 2e 20 20 50 6f 72 74 61 | fashion|. Porta|
|00002b70| 62 69 6c 69 74 79 20 77 | 61 73 20 6f 6e 65 20 6f |bility w|as one o|
|00002b80| 66 20 74 68 65 20 63 68 | 69 65 66 20 67 6f 61 6c |f the ch|ief goal|
|00002b90| 73 20 6f 66 20 74 68 65 | 20 72 75 6e 20 74 69 6d |s of the| run tim|
|00002ba0| 65 2e 0a 0a 0a 2d 64 70 | 67 0a 0a 0a 0a 0a 0a 44 |e....-dp|g......D|
|00002bb0| 61 74 65 3a 20 57 65 64 | 2c 20 32 30 20 4a 61 6e |ate: Wed|, 20 Jan|
|00002bc0| 20 39 33 20 32 33 3a 34 | 30 20 50 53 54 0a 46 72 | 93 23:4|0 PST.Fr|
|00002bd0| 6f 6d 3a 20 6d 69 63 68 | 61 65 6c 40 73 74 62 2e |om: mich|ael@stb.|
|00002be0| 69 6e 66 6f 2e 63 6f 6d | 20 28 4d 69 63 68 61 65 |info.com| (Michae|
|00002bf0| 6c 20 47 65 72 73 74 65 | 6e 29 0a 54 6f 3a 20 67 |l Gerste|n).To: g|
|00002c00| 6e 75 2d 6f 62 6a 63 40 | 70 72 65 70 2e 61 69 2e |nu-objc@|prep.ai.|
|00002c10| 6d 69 74 2e 65 64 75 0a | 53 75 62 6a 65 63 74 3a |mit.edu.|Subject:|
|00002c20| 20 52 65 3a 20 54 68 65 | 20 66 6f 72 77 61 72 64 | Re: The| forward|
|00002c30| 2f 70 65 72 66 6f 72 6d | 76 20 50 75 7a 7a 6c 65 |/perform|v Puzzle|
|00002c40| 0a 0a 48 65 72 65 27 73 | 20 6d 79 20 63 6f 6d 6d |..Here's| my comm|
|00002c50| 65 6e 74 73 20 6f 6e 20 | 68 6f 77 20 74 6f 20 66 |ents on |how to f|
|00002c60| 6f 72 77 61 72 64 3a 0a | 0a 54 68 65 20 69 73 73 |orward:.|.The iss|
|00002c70| 75 65 20 69 73 20 68 6f | 77 20 74 6f 20 70 6f 72 |ue is ho|w to por|
|00002c80| 74 61 62 6c 65 20 66 6f | 72 77 61 72 64 20 61 20 |table fo|rward a |
|00002c90| 63 61 6c 6c 20 74 6f 20 | 73 6f 6d 65 6f 6e 65 20 |call to |someone |
|00002ca0| 65 6c 73 65 2c 20 67 69 | 76 65 6e 20 74 68 61 74 |else, gi|ven that|
|00002cb0| 20 79 6f 75 20 64 6f 6e | 27 74 20 6b 6e 6f 77 20 | you don|'t know |
|00002cc0| 68 6f 77 20 66 61 72 20 | 75 70 20 74 68 65 20 73 |how far |up the s|
|00002cd0| 74 61 63 6b 20 74 68 65 | 20 73 74 61 63 6b 20 66 |tack the| stack f|
|00002ce0| 72 61 6d 65 20 72 75 6e | 73 2c 20 6e 6f 72 20 74 |rame run|s, nor t|
|00002cf0| 68 65 20 66 6f 72 6d 61 | 74 20 6f 66 20 73 61 69 |he forma|t of sai|
|00002d00| 64 20 73 74 61 63 6b 20 | 66 72 61 6d 65 2e 0a 0a |d stack |frame...|
|00002d10| 4d 65 74 68 6f 64 20 6f | 6e 65 3a 0a 59 6f 75 20 |Method o|ne:.You |
|00002d20| 64 65 63 69 64 65 20 74 | 6f 20 70 61 73 73 20 61 |decide t|o pass a|
|00002d30| 20 6d 65 73 73 61 67 65 | 20 74 6f 20 61 6e 20 6f | message| to an o|
|00002d40| 62 6a 65 63 74 2e 20 59 | 6f 75 20 63 61 6c 6c 20 |bject. Y|ou call |
|00002d50| 74 68 65 20 64 69 73 70 | 61 74 63 68 65 72 2e 20 |the disp|atcher. |
|00002d60| 54 68 65 20 64 69 73 70 | 61 74 63 68 65 72 20 6d |The disp|atcher m|
|00002d70| 75 73 74 20 64 6f 20 6f | 6e 65 20 6f 66 20 74 77 |ust do o|ne of tw|
|00002d80| 6f 20 74 68 69 6e 67 73 | 3a 20 49 74 20 6d 75 73 |o things|: It mus|
|00002d90| 74 20 65 69 74 68 65 72 | 20 63 61 6c 6c 20 28 6f |t either| call (o|
|00002da0| 72 20 72 65 74 75 72 6e | 20 74 68 65 20 61 64 64 |r return| the add|
|00002db0| 72 65 73 73 20 6f 66 29 | 20 74 68 65 20 73 70 65 |ress of)| the spe|
|00002dc0| 63 69 66 69 65 64 20 72 | 6f 75 74 69 6e 65 2c 20 |cified r|outine, |
|00002dd0| 6f 72 20 66 61 69 6c 69 | 6e 67 20 74 68 61 74 2c |or faili|ng that,|
|00002de0| 20 74 68 65 20 22 66 6f | 72 77 61 72 64 22 20 72 | the "fo|rward" r|
|00002df0| 6f 75 74 69 6e 65 2e 0a | 0a 41 73 73 75 6d 70 74 |outine..|.Assumpt|
|00002e00| 69 6f 6e 73 20 75 73 65 | 64 3a 20 54 68 65 20 6e |ions use|d: The n|
|00002e10| 75 6d 62 65 72 20 6f 66 | 20 61 72 67 75 6d 65 6e |umber of| argumen|
|00002e20| 74 73 20 64 65 63 6c 61 | 72 65 64 20 74 6f 20 62 |ts decla|red to b|
|00002e30| 65 20 74 61 6b 65 6e 20 | 62 79 20 74 68 65 20 72 |e taken |by the r|
|00002e40| 6f 75 74 69 6e 65 20 28 | 69 6e 20 74 68 69 73 20 |outine (|in this |
|00002e50| 63 61 73 65 2c 20 61 6e | 20 61 72 62 69 74 72 61 |case, an| arbitra|
|00002e60| 72 79 20 6e 75 6d 62 65 | 72 20 6f 66 20 61 72 67 |ry numbe|r of arg|
|00002e70| 73 20 66 72 6f 6d 20 74 | 68 65 20 6f 72 69 67 69 |s from t|he origi|
|00002e80| 6e 61 6c 20 72 6f 75 74 | 69 6e 65 2c 20 61 6e 64 |nal rout|ine, and|
|00002e90| 20 74 68 65 20 70 72 6f | 62 61 62 6c 79 20 30 20 | the pro|bably 0 |
|00002ea0| 61 72 67 73 20 64 65 63 | 6c 61 72 65 64 20 62 79 |args dec|lared by|
|00002eb0| 20 74 68 65 20 66 6f 72 | 77 61 72 64 20 72 6f 75 | the for|ward rou|
|00002ec0| 74 69 6e 65 29 20 64 6f | 20 6e 6f 74 20 61 66 66 |tine) do| not aff|
|00002ed0| 65 63 74 20 74 68 65 20 | 66 6f 72 6d 61 74 20 6f |ect the |format o|
|00002ee0| 66 20 74 68 65 20 73 74 | 61 63 6b 20 66 72 61 6d |f the st|ack fram|
|00002ef0| 65 2e 0a 0a 44 69 73 61 | 64 76 61 6e 74 61 67 65 |e...Disa|dvantage|
|00002f00| 73 3a 20 43 61 6e 6e 6f | 74 20 72 65 74 72 65 69 |s: Canno|t retrei|
|00002f10| 76 65 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 73 |ve the a|rguments|
|00002f20| 20 69 6e 20 74 68 65 20 | 66 6f 72 77 61 72 64 20 | in the |forward |
|00002f30| 72 6f 75 74 69 6e 65 2c | 20 6e 6f 72 20 63 61 6e |routine,| nor can|
|00002f40| 20 74 68 65 20 66 6f 72 | 77 61 72 64 20 72 6f 75 | the for|ward rou|
|00002f50| 74 69 6e 65 20 70 61 73 | 73 20 74 68 6f 73 65 20 |tine pas|s those |
|00002f60| 61 72 67 75 6d 65 6e 74 | 73 20 74 6f 20 61 6e 6f |argument|s to ano|
|00002f70| 74 68 65 72 20 72 6f 75 | 74 69 6e 65 2e 0a 0a 4d |ther rou|tine...M|
|00002f80| 65 74 68 6f 64 20 74 77 | 6f 3a 0a 41 6c 6c 20 6d |ethod tw|o:.All m|
|00002f90| 65 74 68 6f 64 20 63 61 | 6c 6c 73 20 67 65 74 20 |ethod ca|lls get |
|00002fa0| 61 6e 6f 74 68 65 72 20 | 61 72 67 20 70 75 73 68 |another |arg push|
|00002fb0| 65 64 20 6f 6e 20 74 68 | 65 20 73 74 61 63 6b 2c |ed on th|e stack,|
|00002fc0| 20 61 6e 20 69 6e 76 69 | 73 69 62 6c 65 20 61 72 | an invi|sible ar|
|00002fd0| 67 20 73 70 65 63 69 66 | 79 69 6e 67 20 68 6f 77 |g specif|ying how|
|00002fe0| 20 6d 61 6e 79 20 62 79 | 74 65 73 20 68 61 76 65 | many by|tes have|
|00002ff0| 20 62 65 65 6e 20 70 75 | 73 68 65 64 20 6f 6e 20 | been pu|shed on |
|00003000| 74 68 65 20 73 74 61 63 | 6b 2e 20 54 68 69 73 20 |the stac|k. This |
|00003010| 69 73 20 75 73 65 64 20 | 74 6f 20 64 65 74 65 72 |is used |to deter|
|00003020| 6d 69 6e 65 20 74 68 65 | 20 73 74 61 63 6b 20 73 |mine the| stack s|
|00003030| 69 7a 65 2c 20 77 68 69 | 63 68 20 63 61 6e 20 74 |ize, whi|ch can t|
|00003040| 68 65 6e 20 62 65 20 22 | 69 6e 64 65 70 65 6e 64 |hen be "|independ|
|00003050| 65 6e 74 6c 79 22 20 63 | 6f 70 69 65 64 0a 41 64 |ently" c|opied.Ad|
|00003060| 76 61 6e 74 61 67 65 73 | 3a 20 46 61 69 72 6c 79 |vantages|: Fairly|
|00003070| 20 70 6f 72 74 61 62 6c | 65 20 28 73 65 65 20 62 | portabl|e (see b|
|00003080| 65 6c 6f 77 29 0a 44 69 | 73 61 64 76 61 6e 74 61 |elow).Di|sadvanta|
|00003090| 67 65 73 3a 20 44 6f 65 | 73 20 6e 6f 74 20 70 72 |ges: Doe|s not pr|
|000030a0| 6f 70 65 72 6c 79 20 68 | 61 6e 64 6c 65 20 74 68 |operly h|andle th|
|000030b0| 65 20 63 61 73 65 20 6f | 66 20 6f 6e 65 20 61 72 |e case o|f one ar|
|000030c0| 67 20 62 65 69 6e 67 20 | 61 20 70 6f 69 6e 74 65 |g being |a pointe|
|000030d0| 72 20 74 6f 20 61 6e 6f | 74 68 65 72 20 61 72 67 |r to ano|ther arg|
|000030e0| 20 2d 2d 20 79 6f 75 27 | 6c 6c 20 68 61 76 65 20 | -- you'|ll have |
|000030f0| 69 6e 73 74 65 61 64 20 | 61 20 70 6f 69 6e 74 65 |instead |a pointe|
|00003100| 72 20 74 6f 20 73 6f 6d | 65 74 68 69 6e 67 20 62 |r to som|ething b|
|00003110| 61 63 6b 20 75 70 20 74 | 68 65 20 73 74 61 63 6b |ack up t|he stack|
|00003120| 20 69 6e 20 61 6e 6f 74 | 68 65 72 20 66 72 61 6d | in anot|her fram|
|00003130| 65 2e 0a 09 53 74 69 6c | 6c 20 72 65 6c 69 65 73 |e...Stil|l relies|
|00003140| 20 6f 6e 20 74 68 65 20 | 66 6f 72 77 61 72 64 20 | on the |forward |
|00003150| 6d 65 74 68 6f 64 20 6b | 6e 6f 77 69 6e 67 20 74 |method k|nowing t|
|00003160| 68 65 20 73 74 61 63 6b | 20 69 6e 66 6f 2e 0a 0a |he stack| info...|
|00003170| 4d 65 74 68 6f 64 20 74 | 68 72 65 65 3a 0a 41 74 |Method t|hree:.At|
|00003180| 74 65 6d 70 74 69 6e 67 | 20 74 6f 20 65 6d 75 6c |tempting| to emul|
|00003190| 61 74 65 20 74 68 65 20 | 6e 65 78 74 20 6d 65 63 |ate the |next mec|
|000031a0| 68 61 6e 69 73 6d 3a 0a | 54 68 65 20 66 6f 72 77 |hanism:.|The forw|
|000031b0| 61 72 64 20 6d 65 74 68 | 6f 64 20 77 69 6c 6c 20 |ard meth|od will |
|000031c0| 62 65 20 63 61 6c 6c 65 | 64 20 77 69 74 68 20 61 |be calle|d with a|
|000031d0| 20 73 70 65 63 69 61 6c | 20 61 72 67 75 6d 65 6e | special| argumen|
|000031e0| 74 20 74 79 70 65 2c 20 | 74 68 61 74 20 63 61 6e |t type, |that can|
|000031f0| 20 6f 6e 6c 79 20 62 65 | 20 75 73 65 64 20 62 79 | only be| used by|
|00003200| 20 70 61 73 73 69 6e 67 | 20 69 74 20 74 6f 20 74 | passing| it to t|
|00003210| 68 65 20 70 65 72 66 6f | 72 6d 76 20 6d 65 74 68 |he perfo|rmv meth|
|00003220| 6f 64 2e 20 54 68 65 20 | 70 65 72 66 6f 72 6d 76 |od. The |performv|
|00003230| 20 6d 65 74 68 6f 64 20 | 77 69 6c 6c 20 75 73 65 | method |will use|
|00003240| 20 74 68 69 73 20 73 70 | 65 63 69 61 6c 20 74 79 | this sp|ecial ty|
|00003250| 70 65 2c 20 77 69 74 68 | 20 74 68 65 20 67 6f 61 |pe, with| the goa|
|00003260| 6c 20 6f 66 20 62 65 69 | 6e 67 20 69 6d 70 6c 65 |l of bei|ng imple|
|00003270| 6d 65 6e 74 61 74 69 6f | 6e 20 69 6e 64 65 70 65 |mentatio|n indepe|
|00003280| 6e 64 65 6e 74 2c 20 74 | 6f 20 63 61 6c 6c 20 74 |ndent, t|o call t|
|00003290| 68 65 20 72 6f 75 74 69 | 6e 65 2e 0a 0a 49 6e 20 |he routi|ne...In |
|000032a0| 6f 72 64 65 72 20 66 6f | 72 20 70 65 72 66 6f 72 |order fo|r perfor|
|000032b0| 6d 76 20 74 6f 20 62 65 | 20 73 6f 20 69 6e 64 65 |mv to be| so inde|
|000032c0| 70 65 6e 64 65 6e 74 2c | 20 69 74 20 6d 75 73 74 |pendent,| it must|
|000032d0| 20 74 61 6b 65 20 74 68 | 65 20 6e 65 77 20 6f 62 | take th|e new ob|
|000032e0| 6a 65 63 74 2c 20 74 68 | 65 20 6e 65 77 20 6d 65 |ject, th|e new me|
|000032f0| 74 68 6f 64 20 6e 61 6d | 65 2c 20 61 6e 64 20 74 |thod nam|e, and t|
|00003300| 68 65 20 6f 6c 64 20 69 | 6e 66 6f 3b 20 69 74 20 |he old i|nfo; it |
|00003310| 77 6f 75 6c 64 20 74 68 | 65 6e 20 75 6e 77 69 6e |would th|en unwin|
|00003320| 64 20 74 68 65 20 73 74 | 61 63 6b 20 74 6f 20 74 |d the st|ack to t|
|00003330| 68 65 20 70 6f 69 6e 74 | 20 69 6e 64 69 63 61 74 |he point| indicat|
|00003340| 65 64 20 69 6e 20 74 68 | 65 20 73 70 65 63 69 61 |ed in th|e specia|
|00003350| 6c 20 61 72 67 75 6d 65 | 6e 74 2c 20 6d 6f 64 69 |l argume|nt, modi|
|00003360| 66 69 65 73 20 74 68 65 | 20 73 74 61 63 6b 20 66 |fies the| stack f|
|00003370| 72 61 6d 65 20 69 6e 20 | 70 6c 61 63 65 20 74 6f |rame in |place to|
|00003380| 20 73 75 62 73 74 69 74 | 75 74 65 20 74 68 65 20 | substit|ute the |
|00003390| 6e 65 77 20 6f 62 6a 65 | 63 74 20 28 77 68 69 63 |new obje|ct (whic|
|000033a0| 68 20 6d 61 79 20 62 65 | 20 74 68 65 20 73 61 6d |h may be| the sam|
|000033b0| 65 20 61 73 20 74 68 65 | 20 6f 6c 64 29 2c 20 61 |e as the| old), a|
|000033c0| 6e 64 20 74 68 65 20 6e | 65 77 20 6d 65 74 68 6f |nd the n|ew metho|
|000033d0| 64 2c 20 61 6e 64 20 74 | 68 65 6e 20 72 65 72 75 |d, and t|hen reru|
|000033e0| 6e 73 20 74 68 65 20 73 | 65 6e 64 20 72 6f 75 74 |ns the s|end rout|
|000033f0| 69 6e 65 2e 0a 0a 54 68 | 69 73 20 72 65 71 75 69 |ine...Th|is requi|
|00003400| 72 65 73 20 74 68 61 74 | 20 74 68 65 20 73 65 6e |res that| the sen|
|00003410| 64 20 72 6f 75 74 69 6e | 65 2c 20 77 68 65 6e 20 |d routin|e, when |
|00003420| 69 74 20 66 61 69 6c 73 | 2c 20 6d 75 73 74 20 69 |it fails|, must i|
|00003430| 6e 73 74 65 61 64 20 73 | 65 6e 64 20 74 6f 20 74 |nstead s|end to t|
|00003440| 68 65 20 66 6f 72 77 61 | 72 64 20 72 6f 75 74 69 |he forwa|rd routi|
|00003450| 6e 65 2c 20 61 6e 64 20 | 77 69 74 68 20 61 20 73 |ne, and |with a s|
|00003460| 6c 69 67 68 74 6c 79 20 | 64 69 66 66 65 72 65 6e |lightly |differen|
|00003470| 74 20 73 74 61 63 6b 20 | 66 72 61 6d 65 20 2d 2d |t stack |frame --|
|00003480| 20 69 74 20 6e 65 65 64 | 73 20 74 6f 20 70 75 74 | it need|s to put|
|00003490| 20 6f 6e 74 6f 20 74 68 | 65 20 73 74 61 63 6b 20 | onto th|e stack |
|000034a0| 61 20 6e 65 77 20 73 74 | 61 63 6b 20 66 72 61 6d |a new st|ack fram|
|000034b0| 65 20 73 70 65 63 69 66 | 79 69 6e 67 20 74 68 65 |e specif|ying the|
|000034c0| 20 6f 72 69 67 69 6e 61 | 6c 20 6f 62 6a 65 63 74 | origina|l object|
|000034d0| 2c 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 6d |, the or|iginal m|
|000034e0| 65 74 68 6f 64 2c 20 61 | 6e 64 20 74 68 69 73 20 |ethod, a|nd this |
|000034f0| 73 70 65 63 69 61 6c 20 | 61 72 67 75 6d 65 6e 74 |special |argument|
|00003500| 20 66 6f 72 20 70 65 72 | 66 6f 72 6d 76 2e 0a 0a | for per|formv...|
|00003510| 41 64 76 61 6e 74 61 67 | 65 73 3a 20 49 74 20 77 |Advantag|es: It w|
|00003520| 6f 72 6b 73 2e 20 49 74 | 27 73 20 66 61 69 72 6c |orks. It|'s fairl|
|00003530| 79 20 70 6f 72 74 61 62 | 6c 65 2e 20 49 74 20 64 |y portab|le. It d|
|00003540| 6f 65 73 6e 27 74 20 62 | 72 65 61 6b 20 75 6e 64 |oesn't b|reak und|
|00003550| 65 72 20 61 6e 79 20 61 | 72 67 20 74 79 70 65 73 |er any a|rg types|
|00003560| 0a 44 69 73 61 64 76 61 | 6e 74 61 67 65 73 3a 20 |.Disadva|ntages: |
|00003570| 52 65 71 75 69 72 65 73 | 20 74 68 61 74 20 74 68 |Requires| that th|
|00003580| 65 20 6d 61 63 68 69 6e | 65 20 68 61 76 65 20 73 |e machin|e have s|
|00003590| 6f 6d 65 20 77 61 79 20 | 74 6f 20 75 6e 77 69 6e |ome way |to unwin|
|000035a0| 64 20 61 20 73 74 61 63 | 6b 20 66 72 61 6d 65 20 |d a stac|k frame |
|000035b0| 28 64 6f 65 73 20 74 68 | 69 73 20 63 6f 6e 66 6c |(does th|is confl|
|000035c0| 69 63 74 20 77 69 74 68 | 20 72 65 67 69 73 74 65 |ict with| registe|
|000035d0| 72 20 77 69 6e 64 6f 77 | 73 20 6d 61 63 68 69 6e |r window|s machin|
|000035e0| 65 73 3f 29 2e 20 54 68 | 69 73 20 63 6f 64 65 20 |es?). Th|is code |
|000035f0| 28 74 68 65 20 75 6e 77 | 69 6e 64 69 6e 67 20 6f |(the unw|inding o|
|00003600| 66 20 74 68 65 20 73 74 | 61 63 6b 2c 20 61 6e 64 |f the st|ack, and|
|00003610| 20 74 68 65 20 73 65 74 | 74 69 6e 67 20 75 70 20 | the set|ting up |
|00003620| 69 6e 66 6f 20 6e 65 65 | 64 65 64 20 74 6f 20 75 |info nee|ded to u|
|00003630| 6e 77 69 6e 64 29 20 77 | 6f 75 6c 64 20 70 72 6f |nwind) w|ould pro|
|00003640| 62 61 62 6c 79 20 62 65 | 20 6d 61 63 68 69 6e 65 |bably be| machine|
|00003650| 20 73 70 65 63 69 66 69 | 63 2c 20 61 6e 64 20 6f | specifi|c, and o|
|00003660| 6e 6c 79 20 75 73 65 64 | 20 69 6e 20 6f 6e 65 20 |nly used| in one |
|00003670| 6f 72 20 74 77 6f 20 70 | 6c 61 63 65 73 20 28 6e |or two p|laces (n|
|00003680| 6f 74 20 72 65 61 6c 6c | 79 20 6d 75 63 68 20 64 |ot reall|y much d|
|00003690| 69 66 66 65 72 65 6e 74 | 20 74 68 61 6e 20 72 65 |ifferent| than re|
|000036a0| 71 75 69 72 69 6e 67 20 | 65 61 63 68 20 6d 61 63 |quiring |each mac|
|000036b0| 68 69 65 6e 20 64 65 73 | 63 72 69 70 74 69 6f 6e |hien des|cription|
|000036c0| 20 74 6f 20 70 72 6f 76 | 69 64 65 20 61 20 70 72 | to prov|ide a pr|
|000036d0| 6f 6c 6f 67 75 65 20 61 | 6e 64 20 65 70 69 6c 6f |ologue a|nd epilo|
|000036e0| 67 75 65 20 72 6f 75 74 | 69 6e 65 29 2e 20 4e 6f |gue rout|ine). No|
|000036f0| 74 20 63 6f 6d 70 6c 65 | 74 65 6c 79 20 63 6f 6d |t comple|tely com|
|00003700| 70 61 74 69 62 6c 65 20 | 77 69 74 68 20 61 20 6d |patible |with a m|
|00003710| 65 73 73 61 67 65 20 64 | 69 73 70 61 74 63 68 65 |essage d|ispatche|
|00003720| 72 20 74 68 61 74 20 77 | 6f 72 6b 73 20 62 79 20 |r that w|orks by |
|00003730| 72 65 74 75 72 6e 69 6e | 67 20 61 20 70 6f 69 6e |returnin|g a poin|
|00003740| 74 65 72 20 66 6f 72 20 | 73 6f 6d 65 6f 6e 65 20 |ter for |someone |
|00003750| 65 6c 73 65 20 74 6f 20 | 63 61 6c 6c 20 2d 2d 20 |else to |call -- |
|00003760| 77 6f 75 6c 64 20 72 65 | 71 75 69 72 65 20 74 68 |would re|quire th|
|00003770| 61 74 20 74 68 65 20 63 | 6f 64 65 20 73 6f 20 69 |at the c|ode so i|
|00003780| 6e 76 6f 6c 76 65 64 20 | 63 68 61 6e 67 65 20 66 |nvolved |change f|
|00003790| 72 6f 6d 0a 0a 09 70 75 | 73 68 20 61 72 67 73 0a |rom...pu|sh args.|
|000037a0| 09 70 75 73 68 20 6f 62 | 6a 0a 09 70 75 73 68 20 |.push ob|j..push |
|000037b0| 6d 65 74 68 6f 64 0a 09 | 63 61 6c 6c 20 6c 6f 6f |method..|call loo|
|000037c0| 6b 75 70 0a 09 6a 75 6d | 70 20 61 64 64 72 0a 0a |kup..jum|p addr..|
|000037d0| 74 6f 0a 2e 2e 2e 0a 09 | 63 61 6c 6c 20 6c 6f 6f |to......|call loo|
|000037e0| 6b 75 70 0a 09 6a 75 6d | 70 20 4e 5a 2c 61 64 64 |kup..jum|p NZ,add|
|000037f0| 72 0a 09 6a 75 6d 70 20 | 6d 61 73 73 61 67 65 5f |r..jump |massage_|
|00003800| 73 74 61 63 6b 5f 61 6e | 64 5f 66 6f 72 77 61 72 |stack_an|d_forwar|
|00003810| 64 0a 0a 6f 74 68 65 72 | 20 61 72 67 20 70 61 73 |d..other| arg pas|
|00003820| 73 69 6e 67 20 63 6f 6e | 76 65 6e 74 69 6f 6e 73 |sing con|ventions|
|00003830| 20 6d 61 79 20 72 65 71 | 75 69 72 65 20 6f 74 68 | may req|uire oth|
|00003840| 65 72 20 63 68 61 6e 67 | 65 73 20 2d 2d 20 79 6f |er chang|es -- yo|
|00003850| 75 20 6e 65 65 64 20 61 | 20 6e 65 77 20 23 64 65 |u need a| new #de|
|00003860| 66 69 6e 65 20 66 6f 72 | 20 22 74 68 65 20 6e 61 |fine for| "the na|
|00003870| 6d 65 20 6f 66 20 74 68 | 65 20 69 6e 73 6e 20 70 |me of th|e insn p|
|00003880| 61 74 74 65 72 6e 20 74 | 6f 20 75 73 65 20 28 75 |attern t|o use (u|
|00003890| 73 75 61 6c 6c 79 20 6a | 6e 65 29 20 61 66 74 65 |sually j|ne) afte|
|000038a0| 72 20 63 61 6c 6c 69 6e | 67 20 74 68 65 20 6d 65 |r callin|g the me|
|000038b0| 74 68 6f 64 20 6c 6f 6f | 6b 75 70 20 72 6f 75 74 |thod loo|kup rout|
|000038c0| 69 6e 65 3b 20 6d 75 73 | 74 20 6e 6f 74 20 6a 75 |ine; mus|t not ju|
|000038d0| 6d 70 20 69 66 20 61 20 | 6c 6f 6f 6b 75 70 20 66 |mp if a |lookup f|
|000038e0| 61 69 6c 75 72 65 20 6f | 63 63 75 72 73 22 2e 20 |ailure o|ccurs". |
|000038f0| 41 6c 73 6f 20 6e 6f 74 | 20 71 75 69 74 65 20 73 |Also not| quite s|
|00003900| 74 61 6e 64 61 72 64 20 | 69 6e 20 74 68 65 20 69 |tandard |in the i|
|00003910| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|00003920| 20 66 6f 72 77 61 72 64 | 20 61 6e 64 20 70 65 72 | forward| and per|
|00003930| 66 6f 72 6d 76 20 2d 2d | 20 6e 6f 74 65 20 74 68 |formv --| note th|
|00003940| 61 74 20 70 65 72 66 6f | 72 6d 76 20 75 6e 64 65 |at perfo|rmv unde|
|00003950| 72 20 74 68 69 73 20 73 | 79 73 74 65 6d 20 64 6f |r this s|ystem do|
|00003960| 65 73 20 6e 6f 74 20 72 | 65 74 75 72 6e 20 74 6f |es not r|eturn to|
|00003970| 20 74 68 65 20 63 61 6c | 6c 65 72 20 28 66 6f 72 | the cal|ler (for|
|00003980| 77 61 72 64 29 2c 20 62 | 75 74 20 69 6e 73 74 65 |ward), b|ut inste|
|00003990| 61 64 20 74 6f 20 74 68 | 65 20 63 61 6c 6c 65 72 |ad to th|e caller|
|000039a0| 20 6f 66 20 66 6f 72 77 | 61 72 64 2e 20 53 69 6e | of forw|ard. Sin|
|000039b0| 63 65 20 73 65 6e 64 69 | 6e 67 20 61 20 6d 65 73 |ce sendi|ng a mes|
|000039c0| 73 61 67 65 20 22 6d 65 | 74 68 6f 64 31 22 20 74 |sage "me|thod1" t|
|000039d0| 6f 20 22 66 6f 6f 22 20 | 69 73 20 74 72 61 6e 73 |o "foo" |is trans|
|000039e0| 6c 61 74 65 64 20 69 6e | 74 6f 20 61 20 22 66 6f |lated in|to a "fo|
|000039f0| 72 77 61 72 64 22 20 6d | 65 73 73 61 67 65 2c 20 |rward" m|essage, |
|00003a00| 74 68 69 73 20 68 61 73 | 20 74 68 65 20 72 65 73 |this has| the res|
|00003a10| 75 6c 74 20 6f 66 20 72 | 65 74 75 72 6e 69 6e 67 |ult of r|eturning|
|00003a20| 20 64 69 72 65 63 74 6c | 79 20 61 66 74 65 72 20 | directl|y after |
|00003a30| 74 68 65 20 63 61 6c 6c | 20 74 6f 20 6d 65 74 68 |the call| to meth|
|00003a40| 6f 64 31 2c 20 77 69 74 | 68 20 6e 6f 20 77 61 79 |od1, wit|h no way|
|00003a50| 20 66 6f 72 20 74 68 61 | 74 20 72 6f 75 74 69 6e | for tha|t routin|
|00003a60| 65 20 74 6f 20 6b 6e 6f | 77 20 74 68 61 74 20 61 |e to kno|w that a|
|00003a70| 20 66 61 69 6c 75 72 65 | 20 6f 63 63 75 72 65 64 | failure| occured|
|00003a80| 20 28 61 6e 64 20 6e 6f | 20 77 61 79 20 66 6f 72 | (and no| way for|
|00003a90| 20 74 68 65 20 66 6f 72 | 77 61 72 64 20 72 6f 75 | the for|ward rou|
|00003aa0| 74 69 6e 65 20 74 6f 20 | 64 6f 20 73 6f 6d 65 74 |tine to |do somet|
|00003ab0| 68 69 6e 67 20 41 46 54 | 45 52 20 74 68 65 20 70 |hing AFT|ER the p|
|00003ac0| 65 72 66 6f 72 6d 76 2c | 20 77 68 69 63 68 20 6d |erformv,| which m|
|00003ad0| 61 79 20 76 61 72 79 20 | 77 65 6c 6c 20 62 65 20 |ay vary |well be |
|00003ae0| 64 65 73 69 72 65 61 62 | 6c 65 29 2e 20 4e 6f 20 |desireab|le). No |
|00003af0| 65 61 73 79 20 77 61 79 | 20 74 6f 20 63 68 65 63 |easy way| to chec|
|00003b00| 6b 20 66 6f 72 20 61 20 | 22 64 6f 75 62 6c 65 20 |k for a |"double |
|00003b10| 66 6f 72 77 61 72 64 22 | 2c 20 77 68 65 72 65 20 |forward"|, where |
|00003b20| 74 68 65 20 66 6f 72 77 | 61 72 64 20 72 6f 75 74 |the forw|ard rout|
|00003b30| 69 6e 65 20 63 61 6e 6e | 6f 74 20 6f 70 65 72 61 |ine cann|ot opera|
|00003b40| 74 65 20 62 65 63 61 75 | 73 65 20 6f 66 20 61 20 |te becau|se of a |
|00003b50| 66 61 69 6c 65 64 20 73 | 65 6e 64 20 28 69 6e 66 |failed s|end (inf|
|00003b60| 69 6e 69 74 65 20 6c 6f | 6f 70 20 69 6e 20 74 68 |inite lo|op in th|
|00003b70| 65 20 65 72 72 6f 72 20 | 68 61 6e 64 6c 65 72 29 |e error |handler)|
|00003b80| 2e 20 53 74 69 6c 6c 2c | 20 69 74 20 6c 6f 6f 6b |. Still,| it look|
|00003b90| 73 20 6c 69 6b 65 20 74 | 68 65 20 62 65 73 74 20 |s like t|he best |
|00003ba0| 6f 66 20 74 68 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |of the i|mplement|
|00003bb0| 61 74 69 6f 6e 20 69 6e | 64 65 70 65 6e 64 65 6e |ation in|dependen|
|00003bc0| 74 20 77 61 79 73 2e 20 | 57 6f 75 6c 64 20 73 6f |t ways. |Would so|
|00003bd0| 6d 65 6f 6e 65 20 6c 69 | 6b 65 20 74 6f 20 73 68 |meone li|ke to sh|
|00003be0| 6f 6f 74 20 69 74 20 64 | 6f 77 6e 20 70 6c 65 61 |oot it d|own plea|
|00003bf0| 73 65 3f 0a 2d 2d 0a 09 | 4d 69 63 68 61 65 6c 20 |se?.--..|Michael |
|00003c00| 47 65 72 73 74 65 6e 09 | 09 6d 69 63 68 61 65 6c |Gersten.|.michael|
|00003c10| 40 73 74 62 2e 69 6e 66 | 6f 2e 63 6f 6d 0a 4e 65 |@stb.inf|o.com.Ne|
|00003c20| 58 54 20 52 65 67 69 73 | 74 65 72 65 64 20 44 65 |XT Regis|tered De|
|00003c30| 76 65 6c 6f 70 65 72 20 | 28 4e 65 52 44 29 20 23 |veloper |(NeRD) #|
|00003c40| 20 33 38 36 30 20 2d 2d | 20 48 69 72 65 20 6d 65 | 3860 --| Hire me|
|00003c50| 21 20 51 75 69 63 6b 21 | 0a 57 69 6c 6c 20 70 72 |! Quick!|.Will pr|
|00003c60| 6f 67 72 61 6d 20 63 6f | 6d 70 75 74 65 72 73 20 |ogram co|mputers |
|00003c70| 66 6f 72 20 66 6f 6f 64 | 20 28 61 6e 64 20 6e 65 |for food| (and ne|
|00003c80| 74 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 2c 20 68 65 |t connec|tion, he|
|00003c90| 61 6c 74 68 20 62 65 6e | 65 66 69 74 73 2c 20 63 |alth ben|efits, c|
|00003ca0| 61 73 68 2c 2e 2e 2e 29 | 0a 0a 44 61 74 65 3a 20 |ash,...)|..Date: |
|00003cb0| 54 68 75 2c 20 32 31 20 | 4a 61 6e 20 39 33 20 31 |Thu, 21 |Jan 93 1|
|00003cc0| 31 3a 35 33 3a 34 39 20 | 2d 30 36 30 30 0a 46 72 |1:53:49 |-0600.Fr|
|00003cd0| 6f 6d 3a 20 62 75 72 63 | 68 61 72 64 40 67 65 6f |om: burc|hard@geo|
|00003ce0| 6d 2e 75 6d 6e 2e 65 64 | 75 0a 54 6f 3a 20 6d 69 |m.umn.ed|u.To: mi|
|00003cf0| 63 68 61 65 6c 40 73 74 | 62 2e 69 6e 66 6f 2e 63 |chael@st|b.info.c|
|00003d00| 6f 6d 20 28 4d 69 63 68 | 61 65 6c 20 47 65 72 73 |om (Mich|ael Gers|
|00003d10| 74 65 6e 29 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |ten).Sub|ject: Re|
|00003d20| 3a 20 54 68 65 20 66 6f | 72 77 61 72 64 2f 70 65 |: The fo|rward/pe|
|00003d30| 72 66 6f 72 6d 76 20 50 | 75 7a 7a 6c 65 0a 43 63 |rformv P|uzzle.Cc|
|00003d40| 3a 20 67 6e 75 2d 6f 62 | 6a 63 40 70 72 65 70 2e |: gnu-ob|jc@prep.|
|00003d50| 61 69 2e 6d 69 74 2e 65 | 64 75 0a 0a 3e 20 28 64 |ai.mit.e|du..> (d|
|00003d60| 6f 65 73 20 74 68 69 73 | 20 63 6f 6e 66 6c 69 63 |oes this| conflic|
|00003d70| 74 20 77 69 74 68 20 72 | 65 67 69 73 74 65 72 20 |t with r|egister |
|00003d80| 77 69 6e 64 6f 77 73 20 | 6d 61 63 68 69 6e 65 73 |windows |machines|
|00003d90| 3f 29 0a 0a 54 6f 20 61 | 76 6f 69 64 20 6c 6f 74 |?)..To a|void lot|
|00003da0| 73 20 6f 66 20 68 79 70 | 6f 74 68 65 74 69 63 61 |s of hyp|othetica|
|00003db0| 6c 20 64 69 73 63 75 73 | 73 69 6f 6e 73 2c 20 49 |l discus|sions, I|
|00003dc0| 20 73 75 67 67 65 73 74 | 20 65 76 65 72 79 6f 6e | suggest| everyon|
|00003dd0| 65 20 74 68 69 6e 6b 69 | 6e 67 20 61 62 6f 75 74 |e thinki|ng about|
|00003de0| 20 74 68 69 73 20 74 61 | 6b 65 20 61 20 6c 6f 6f | this ta|ke a loo|
|00003df0| 6b 20 61 74 20 73 65 63 | 74 69 6f 6e 20 31 34 2e |k at sec|tion 14.|
|00003e00| 37 20 6f 66 20 74 68 65 | 20 47 4e 55 20 43 43 20 |7 of the| GNU CC |
|00003e10| 6d 61 6e 75 61 6c 2c 20 | 6f 6e 20 43 20 63 61 6c |manual, |on C cal|
|00003e20| 6c 69 6e 67 20 63 6f 6e | 76 65 6e 74 69 6f 6e 73 |ling con|ventions|
|00003e30| 20 28 61 62 6f 75 74 20 | 61 20 64 6f 7a 65 6e 20 | (about |a dozen |
|00003e40| 70 61 67 65 73 29 2e 20 | 20 49 74 20 77 61 73 20 |pages). | It was |
|00003e50| 61 6e 20 65 79 65 2d 6f | 70 65 6e 65 72 20 66 6f |an eye-o|pener fo|
|00003e60| 72 20 6d 65 2d 2d 2d 49 | 20 68 61 64 6e 27 74 20 |r me---I| hadn't |
|00003e70| 72 65 61 6c 69 7a 65 64 | 20 74 68 61 74 20 73 6f |realized| that so|
|00003e80| 6d 65 20 70 6c 61 74 66 | 6f 72 6d 73 20 77 69 6c |me platf|orms wil|
|00003e90| 6c 20 67 6f 20 73 6f 20 | 66 61 72 20 61 73 20 74 |l go so |far as t|
|00003ea0| 6f 20 73 70 6c 69 74 20 | 61 20 73 69 6e 67 6c 65 |o split |a single|
|00003eb0| 20 61 72 67 75 6d 65 6e | 74 20 69 6e 74 6f 20 70 | argumen|t into p|
|00003ec0| 69 65 63 65 73 2c 20 61 | 6e 64 20 70 61 73 73 20 |ieces, a|nd pass |
|00003ed0| 70 61 72 74 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |part on |the stac|
|00003ee0| 6b 20 61 6e 64 20 70 61 | 72 74 20 69 6e 20 61 20 |k and pa|rt in a |
|00003ef0| 72 65 67 69 73 74 65 72 | 2e 20 20 41 6e 64 20 64 |register|. And d|
|00003f00| 6f 6e 27 74 20 63 6f 75 | 6e 74 20 6f 6e 20 74 68 |on't cou|nt on th|
|00003f10| 65 72 65 20 62 65 69 6e | 67 20 73 74 61 63 6b 20 |ere bein|g stack |
|00003f20| 73 70 61 63 65 20 22 72 | 65 73 65 72 76 65 64 22 |space "r|eserved"|
|00003f30| 20 66 6f 72 20 74 68 65 | 20 6d 69 73 73 69 6e 67 | for the| missing|
|00003f40| 20 61 72 67 73 2f 70 69 | 65 63 65 73 20 74 68 61 | args/pi|eces tha|
|00003f50| 74 20 61 72 65 20 70 61 | 73 73 65 64 20 69 6e 20 |t are pa|ssed in |
|00003f60| 72 65 67 69 73 74 65 72 | 73 2e 0a 0a 54 68 65 20 |register|s...The |
|00003f70| 76 61 72 61 72 67 73 20 | 66 61 63 69 6c 69 74 69 |varargs |faciliti|
|00003f80| 65 73 20 69 6e 20 47 4e | 55 20 43 43 20 70 72 6f |es in GN|U CC pro|
|00003f90| 76 69 64 65 20 61 20 62 | 69 74 20 6f 66 20 67 75 |vide a b|it of gu|
|00003fa0| 69 64 61 6e 63 65 20 62 | 75 74 20 6e 6f 74 20 61 |idance b|ut not a|
|00003fb0| 20 6c 6f 74 20 6f 66 20 | 61 63 74 75 61 6c 20 68 | lot of |actual h|
|00003fc0| 65 6c 70 2e 20 20 54 68 | 65 20 6f 6e 65 20 74 68 |elp. Th|e one th|
|00003fd0| 69 6e 67 20 74 68 61 74 | 20 63 6f 75 6c 64 20 62 |ing that| could b|
|00003fe0| 65 20 68 65 6c 70 66 75 | 6c 20 69 73 20 74 68 65 |e helpfu|l is the|
|00003ff0| 20 62 75 69 6c 74 69 6e | 20 22 66 75 6e 63 74 69 | builtin| "functi|
|00004000| 6f 6e 22 20 5f 5f 62 75 | 69 6c 74 69 6e 5f 73 61 |on" __bu|iltin_sa|
|00004010| 76 65 72 65 67 73 28 29 | 2e 20 20 44 6f 6e 27 74 |veregs()|. Don't|
|00004020| 20 74 72 79 20 74 61 6b | 69 6e 67 20 61 20 70 6f | try tak|ing a po|
|00004030| 69 6e 74 65 72 20 74 6f | 20 74 68 69 73 20 74 68 |inter to| this th|
|00004040| 69 6e 67 2d 2d 2d 69 74 | 27 73 20 72 65 61 6c 6c |ing---it|'s reall|
|00004050| 79 20 61 20 73 6c 69 70 | 70 65 72 79 20 63 6f 6d |y a slip|pery com|
|00004060| 70 69 6c 65 72 20 74 72 | 69 63 6b 20 74 6f 20 63 |piler tr|ick to c|
|00004070| 61 75 73 65 20 74 68 65 | 20 69 6e 73 65 72 74 69 |ause the| inserti|
|00004080| 6f 6e 20 6f 66 20 73 6f | 6d 65 20 61 73 73 65 6d |on of so|me assem|
|00004090| 62 6c 79 20 63 6f 64 65 | 20 61 74 20 74 68 65 20 |bly code| at the |
|000040a0| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 74 68 65 |beginnin|g of the|
|000040b0| 20 72 6f 75 74 69 6e 65 | 20 28 6e 6f 20 6d 61 74 | routine| (no mat|
|000040c0| 74 65 72 20 77 68 65 72 | 65 20 69 74 27 73 20 22 |ter wher|e it's "|
|000040d0| 63 61 6c 6c 65 64 22 29 | 2e 20 20 54 68 65 20 61 |called")|. The a|
|000040e0| 73 73 65 6d 62 6c 79 20 | 63 6f 64 65 20 66 6f 72 |ssembly |code for|
|000040f0| 20 5f 5f 62 75 69 6c 74 | 69 6e 5f 73 61 76 65 72 | __built|in_saver|
|00004100| 65 67 73 28 29 20 69 73 | 20 6d 61 69 6e 74 61 69 |egs() is| maintai|
|00004110| 6e 65 64 20 66 6f 72 20 | 65 61 63 68 20 70 6c 61 |ned for |each pla|
|00004120| 74 66 6f 72 6d 20 74 68 | 61 74 20 6e 65 65 64 73 |tform th|at needs|
|00004130| 20 69 74 20 69 6e 20 6c | 69 62 67 63 63 32 2e 63 | it in l|ibgcc2.c|
|00004140| 2e 20 20 54 68 61 6e 6b | 66 75 6c 6c 79 20 69 74 |. Thank|fully it|
|00004150| 20 69 73 6e 27 74 2c 20 | 69 6e 20 74 68 65 20 65 | isn't, |in the e|
|00004160| 6e 64 2c 20 61 6c 6c 20 | 74 68 61 74 20 74 65 72 |nd, all |that ter|
|00004170| 72 69 62 6c 65 2c 20 61 | 6e 64 20 67 69 76 65 73 |rible, a|nd gives|
|00004180| 20 73 6f 6d 65 20 68 69 | 6e 74 73 20 61 62 6f 75 | some hi|nts abou|
|00004190| 74 20 68 6f 77 20 74 68 | 65 20 6f 70 70 6f 73 69 |t how th|e opposi|
|000041a0| 74 65 20 6f 70 65 72 61 | 74 69 6f 6e 20 28 6f 66 |te opera|tion (of|
|000041b0| 20 6c 6f 61 64 69 6e 67 | 20 61 72 67 75 6d 65 6e | loading| argumen|
|000041c0| 74 73 20 70 72 6f 70 65 | 72 6c 79 20 66 72 6f 6d |ts prope|rly from|
|000041d0| 20 61 20 6d 6f 72 65 20 | 75 6e 69 66 6f 72 6d 20 | a more |uniform |
|000041e0| 66 6f 72 6d 61 74 29 20 | 77 6f 75 6c 64 20 70 72 |format) |would pr|
|000041f0| 6f 63 65 65 64 2e 0a 0a | 53 74 69 6c 6c 2c 20 61 |oceed...|Still, a|
|00004200| 66 74 65 72 20 6c 6f 6f | 6b 69 6e 67 20 61 74 20 |fter loo|king at |
|00004210| 61 6c 6c 20 74 68 69 73 | 2c 20 49 20 68 61 76 65 |all this|, I have|
|00004220| 20 74 6f 20 72 65 67 61 | 72 64 20 74 68 65 20 73 | to rega|rd the s|
|00004230| 74 61 63 6b 2d 6f 72 69 | 65 6e 74 65 64 20 61 72 |tack-ori|ented ar|
|00004240| 67 75 6d 65 6e 74 20 69 | 6e 66 6f 20 6d 61 69 6e |gument i|nfo main|
|00004250| 74 61 69 6e 65 64 20 61 | 6e 64 20 70 75 62 6c 69 |tained a|nd publi|
|00004260| 73 68 65 64 20 62 79 20 | 74 68 65 20 4f 62 6a 2d |shed by |the Obj-|
|00004270| 43 20 72 75 6e 74 69 6d | 65 20 61 73 20 62 65 69 |C runtim|e as bei|
|00004280| 6e 67 20 73 6f 6d 65 77 | 68 61 74 20 65 75 70 68 |ng somew|hat euph|
|00004290| 65 6d 69 73 74 69 63 2e | 0a 0a 2d 2d 2d 2d 2d 2d |emistic.|..------|
|000042a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000042b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000042c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000042d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 50 |--------|------.P|
|000042e0| 61 75 6c 20 42 75 72 63 | 68 61 72 64 09 3c 62 75 |aul Burc|hard.<bu|
|000042f0| 72 63 68 61 72 64 40 67 | 65 6f 6d 2e 75 6d 6e 2e |rchard@g|eom.umn.|
|00004300| 65 64 75 3e 0a 60 60 49 | 27 6d 20 73 74 69 6c 6c |edu>.``I|'m still|
|00004310| 20 6c 65 61 72 6e 69 6e | 67 20 68 6f 77 20 74 6f | learnin|g how to|
|00004320| 20 63 6f 75 6e 74 20 62 | 61 63 6b 77 61 72 64 73 | count b|ackwards|
|00004330| 20 66 72 6f 6d 20 69 6e | 66 69 6e 69 74 79 2e 2e | from in|finity..|
|00004340| 2e 27 27 0a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.''.----|--------|
|00004350| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004380| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 0a 44 61 74 65 3a 20 |--------|..Date: |
|00004390| 53 61 74 2c 20 32 33 20 | 4a 61 6e 20 39 33 20 31 |Sat, 23 |Jan 93 1|
|000043a0| 35 3a 30 34 3a 32 34 20 | 2d 30 35 30 30 0a 46 72 |5:04:24 |-0500.Fr|
|000043b0| 6f 6d 3a 20 72 6d 73 40 | 67 6e 75 2e 61 69 2e 6d |om: rms@|gnu.ai.m|
|000043c0| 69 74 2e 65 64 75 20 28 | 52 69 63 68 61 72 64 20 |it.edu (|Richard |
|000043d0| 53 74 61 6c 6c 6d 61 6e | 29 0a 54 6f 3a 20 53 74 |Stallman|).To: St|
|000043e0| 65 76 65 5f 4e 61 72 6f | 66 66 40 6e 65 78 74 2e |eve_Naro|ff@next.|
|000043f0| 63 6f 6d 0a 43 63 3a 20 | 64 65 6e 6e 69 73 5f 67 |com.Cc: |dennis_g|
|00004400| 6c 61 74 74 69 6e 67 40 | 74 72 69 72 65 78 2e 63 |latting@|trirex.c|
|00004410| 6f 6d 2c 20 67 6e 75 2d | 6f 62 6a 63 40 70 72 65 |om, gnu-|objc@pre|
|00004420| 70 2e 61 69 2e 6d 69 74 | 2e 65 64 75 0a 49 6e 2d |p.ai.mit|.edu.In-|
|00004430| 52 65 70 6c 79 2d 54 6f | 3a 20 3c 39 33 30 31 32 |Reply-To|: <93012|
|00004440| 30 30 31 35 30 2e 41 41 | 32 34 37 35 39 40 6f 7a |00150.AA|24759@oz|
|00004450| 2e 4e 65 58 54 2e 43 4f | 4d 3e 20 28 6d 65 73 73 |.NeXT.CO|M> (mess|
|00004460| 61 67 65 20 66 72 6f 6d | 20 53 74 65 76 65 20 4e |age from| Steve N|
|00004470| 61 72 6f 66 66 20 6f 6e | 20 54 75 65 2c 20 31 39 |aroff on| Tue, 19|
|00004480| 20 4a 61 6e 20 39 33 20 | 31 37 3a 35 30 3a 32 34 | Jan 93 |17:50:24|
|00004490| 20 2d 30 38 30 30 29 0a | 53 75 62 6a 65 63 74 3a | -0800).|Subject:|
|000044a0| 20 54 68 65 20 66 6f 72 | 77 61 72 64 2f 70 65 72 | The for|ward/per|
|000044b0| 66 6f 72 6d 76 20 50 75 | 7a 7a 6c 65 0a 0a 49 20 |formv Pu|zzle..I |
|000044c0| 77 6f 75 6c 20 6c 69 6b | 65 20 74 6f 20 73 65 65 |woul lik|e to see|
|000044d0| 20 61 20 66 65 61 74 75 | 72 65 20 69 6e 20 43 20 | a featu|re in C |
|000044e0| 74 6f 20 61 6c 6c 6f 77 | 20 63 6f 6e 73 74 72 75 |to allow| constru|
|000044f0| 63 74 69 6f 6e 20 6f 66 | 20 61 6e 20 61 72 67 75 |ction of| an argu|
|00004500| 6d 65 6e 74 0a 6c 69 73 | 74 20 77 69 74 68 20 74 |ment.lis|t with t|
|00004510| 79 70 65 73 20 61 6e 64 | 20 6e 75 6d 62 65 72 20 |ypes and| number |
|00004520| 6f 66 20 61 72 67 73 20 | 63 68 6f 73 65 6e 20 61 |of args |chosen a|
|00004530| 74 20 72 75 6e 20 74 69 | 6d 65 2c 0a 70 6c 75 73 |t run ti|me,.plus|
|00004540| 20 61 20 66 65 61 74 75 | 72 65 20 74 6f 20 63 61 | a featu|re to ca|
|00004550| 6c 6c 20 61 20 66 75 6e | 63 74 69 6f 6e 20 77 69 |ll a fun|ction wi|
|00004560| 74 68 20 73 75 63 68 20 | 61 6e 20 61 72 67 75 6d |th such |an argum|
|00004570| 65 6e 74 20 6c 69 73 74 | 2e 0a 46 6f 72 77 61 72 |ent list|..Forwar|
|00004580| 64 69 6e 67 20 63 6f 75 | 6c 64 20 75 73 65 20 74 |ding cou|ld use t|
|00004590| 68 69 73 20 66 65 61 74 | 75 72 65 20 61 6e 64 20 |his feat|ure and |
|000045a0| 77 6f 75 6c 64 20 74 68 | 65 6e 20 6e 6f 74 20 6e |would th|en not n|
|000045b0| 65 65 64 0a 61 6e 79 20 | 61 73 73 65 6d 62 6c 65 |eed.any |assemble|
|000045c0| 72 20 6c 61 6e 67 75 61 | 67 65 20 73 75 70 70 6f |r langua|ge suppo|
|000045d0| 72 74 2e 0a 0a 0a 57 65 | 20 77 6f 75 6c 64 20 6e |rt....We| would n|
|000045e0| 65 65 64 20 74 6f 20 68 | 61 76 65 20 64 65 73 63 |eed to h|ave desc|
|000045f0| 72 69 70 74 6f 72 73 20 | 66 6f 72 20 74 79 70 65 |riptors |for type|
|00004600| 73 2e 20 20 54 68 65 79 | 20 77 6f 75 6c 64 20 6e |s. They| would n|
|00004610| 6f 74 0a 6e 65 63 65 73 | 73 61 72 69 6c 79 20 68 |ot.neces|sarily h|
|00004620| 61 76 65 20 74 6f 20 67 | 69 76 65 20 63 6f 6d 70 |ave to g|ive comp|
|00004630| 6c 65 74 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |lete inf|ormation|
|00004640| 20 61 62 6f 75 74 20 74 | 68 65 20 74 79 70 65 2c | about t|he type,|
|00004650| 20 62 75 74 20 74 68 65 | 79 0a 77 6f 75 6c 64 20 | but the|y.would |
|00004660| 68 61 76 65 20 74 6f 20 | 67 69 76 65 20 65 6e 6f |have to |give eno|
|00004670| 75 67 68 20 74 6f 20 64 | 65 63 69 64 65 20 68 6f |ugh to d|ecide ho|
|00004680| 77 20 74 6f 20 70 61 73 | 73 20 61 6e 20 61 72 67 |w to pas|s an arg|
|00004690| 75 6d 65 6e 74 2e 20 20 | 50 65 72 68 61 70 73 0a |ument. |Perhaps.|
|000046a0| 61 20 5f 5f 62 75 69 6c | 74 69 6e 5f 63 6c 61 73 |a __buil|tin_clas|
|000046b0| 73 69 66 79 5f 74 79 70 | 65 20 76 61 6c 75 65 20 |sify_typ|e value |
|000046c0| 70 6c 75 73 20 74 68 65 | 20 73 69 7a 65 20 77 6f |plus the| size wo|
|000046d0| 75 6c 64 20 62 65 20 65 | 6e 6f 75 67 68 20 69 6e |uld be e|nough in|
|000046e0| 66 6f 2e 0a 0a 54 68 65 | 6e 20 74 68 65 20 61 72 |fo...The|n the ar|
|000046f0| 67 6c 69 73 74 20 77 6f | 75 6c 64 20 62 65 20 61 |glist wo|uld be a|
|00004700| 6e 20 61 72 72 61 79 20 | 6f 66 20 74 68 69 73 20 |n array |of this |
|00004710| 73 74 72 75 63 74 75 72 | 65 3a 0a 0a 73 74 72 75 |structur|e:..stru|
|00004720| 63 74 20 64 61 74 75 6d | 20 7b 20 69 6e 74 20 74 |ct datum| { int t|
|00004730| 79 70 65 63 6c 61 73 73 | 3b 20 69 6e 74 20 73 69 |ypeclass|; int si|
|00004740| 7a 65 3b 20 76 6f 69 64 | 20 2a 61 64 64 72 65 73 |ze; void| *addres|
|00004750| 73 3b 20 7d 3b 0a 0a 59 | 6f 75 20 77 6f 75 6c 64 |s; };..Y|ou would|
|00004760| 20 63 61 6c 6c 20 61 20 | 66 75 6e 63 74 69 6f 6e | call a |function|
|00004770| 20 75 73 69 6e 67 20 61 | 70 70 6c 79 3a 0a 0a 76 | using a|pply:..v|
|00004780| 6f 69 64 20 61 70 70 6c | 79 20 28 73 74 72 75 63 |oid appl|y (struc|
|00004790| 74 20 64 61 74 75 6d 20 | 76 61 6c 75 65 2c 20 73 |t datum |value, s|
|000047a0| 74 72 75 63 74 20 64 61 | 74 75 6d 20 2a 61 72 67 |truct da|tum *arg|
|000047b0| 75 6d 65 6e 74 73 29 3b | 0a 0a 0a 57 69 74 68 20 |uments);|...With |
|000047c0| 73 6f 6d 65 20 77 6f 72 | 6b 2c 20 69 74 20 77 6f |some wor|k, it wo|
|000047d0| 75 6c 64 20 62 65 20 70 | 6f 73 73 69 62 6c 65 20 |uld be p|ossible |
|000047e0| 74 6f 20 61 72 72 61 6e | 67 65 20 74 6f 20 77 72 |to arran|ge to wr|
|000047f0| 69 74 65 20 61 70 70 6c | 79 0a 69 6e 20 6c 69 62 |ite appl|y.in lib|
|00004800| 67 63 32 2e 63 20 61 6e | 64 20 6d 61 6b 65 20 69 |gc2.c an|d make i|
|00004810| 74 20 70 6f 72 74 61 62 | 6c 65 20 62 79 20 75 73 |t portab|le by us|
|00004820| 69 6e 67 20 74 68 65 20 | 73 61 6d 65 20 46 55 4e |ing the |same FUN|
|00004830| 43 54 49 4f 4e 5f 41 52 | 47 2e 2e 2e 0a 6d 61 63 |CTION_AR|G....mac|
|00004840| 72 6f 73 20 75 73 65 64 | 20 69 6e 20 65 78 70 61 |ros used| in expa|
|00004850| 6e 64 5f 63 61 6c 6c 2e | 20 20 57 65 20 77 6f 75 |nd_call.| We wou|
|00004860| 6c 64 20 68 61 76 65 20 | 74 6f 20 6d 61 6b 65 20 |ld have |to make |
|00004870| 74 68 6f 73 65 20 6d 61 | 63 72 6f 73 0a 75 73 65 |those ma|cros.use|
|00004880| 20 61 20 73 74 72 75 63 | 74 20 64 61 74 75 6d 20 | a struc|t datum |
|00004890| 72 61 74 68 65 72 20 74 | 68 61 6e 20 61 20 74 72 |rather t|han a tr|
|000048a0| 65 65 20 6e 6f 64 65 2c | 20 74 6f 20 72 65 70 72 |ee node,| to repr|
|000048b0| 65 73 65 6e 74 20 74 79 | 70 65 20 69 6e 66 6f 2c |esent ty|pe info,|
|000048c0| 0a 61 6e 64 20 63 68 61 | 6e 67 65 20 74 68 65 20 |.and cha|nge the |
|000048d0| 6d 61 63 68 69 6e 65 20 | 64 65 73 63 72 69 70 74 |machine |descript|
|000048e0| 69 6f 6e 73 2c 20 62 75 | 74 20 74 68 61 74 20 69 |ions, bu|t that i|
|000048f0| 73 20 6f 6b 2e 0a 0a 0a | 50 6c 65 61 73 65 20 74 |s ok....|Please t|
|00004900| 65 6c 6c 20 6d 65 20 69 | 66 20 79 6f 75 20 76 6f |ell me i|f you vo|
|00004910| 6c 75 6e 74 65 65 72 20 | 74 6f 20 77 72 69 74 65 |lunteer |to write|
|00004920| 20 74 68 69 73 2e 0a 0a | 44 61 74 65 3a 20 53 61 | this...|Date: Sa|
|00004930| 74 2c 20 32 33 20 4a 61 | 6e 20 39 33 20 31 36 3a |t, 23 Ja|n 93 16:|
|00004940| 32 39 3a 31 34 20 2d 30 | 36 30 30 0a 46 72 6f 6d |29:14 -0|600.From|
|00004950| 3a 20 62 75 72 63 68 61 | 72 64 40 67 65 6f 6d 2e |: burcha|rd@geom.|
|00004960| 75 6d 6e 2e 65 64 75 0a | 54 6f 3a 20 72 6d 73 40 |umn.edu.|To: rms@|
|00004970| 67 6e 75 2e 61 69 2e 6d | 69 74 2e 65 64 75 20 28 |gnu.ai.m|it.edu (|
|00004980| 52 69 63 68 61 72 64 20 | 53 74 61 6c 6c 6d 61 6e |Richard |Stallman|
|00004990| 29 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 54 |).Subjec|t: Re: T|
|000049a0| 68 65 20 66 6f 72 77 61 | 72 64 2f 70 65 72 66 6f |he forwa|rd/perfo|
|000049b0| 72 6d 76 20 50 75 7a 7a | 6c 65 0a 43 63 3a 20 67 |rmv Puzz|le.Cc: g|
|000049c0| 6e 75 2d 6f 62 6a 63 40 | 70 72 65 70 2e 61 69 2e |nu-objc@|prep.ai.|
|000049d0| 6d 69 74 2e 65 64 75 0a | 0a 4f 6f 70 73 2e 2e 2e |mit.edu.|.Oops...|
|000049e0| 2e 61 20 63 6f 75 70 6c | 65 20 6f 66 20 74 79 70 |.a coupl|e of typ|
|000049f0| 6f 73 20 6d 61 64 65 20 | 74 68 65 69 72 20 77 61 |os made |their wa|
|00004a00| 79 20 69 6e 74 6f 20 6f | 75 72 20 6c 65 74 74 65 |y into o|ur lette|
|00004a10| 72 73 2e 2e 2e 6a 75 73 | 74 20 74 6f 20 61 76 6f |rs...jus|t to avo|
|00004a20| 69 64 20 61 6e 79 20 63 | 6f 6e 66 75 73 69 6f 6e |id any c|onfusion|
|00004a30| 20 68 65 72 65 20 74 68 | 65 79 20 61 72 65 2e 2e | here th|ey are..|
|00004a40| 2e 2e 0a 0a 52 69 63 68 | 61 72 64 20 53 74 61 6c |....Rich|ard Stal|
|00004a50| 6c 6d 61 6e 20 77 72 6f | 74 65 3a 0a 3e 20 20 76 |lman wro|te:.> v|
|00004a60| 6f 69 64 20 61 70 70 6c | 79 20 28 73 74 72 75 63 |oid appl|y (struc|
|00004a70| 74 20 64 61 74 75 6d 20 | 76 61 6c 75 65 2c 20 73 |t datum |value, s|
|00004a80| 74 72 75 63 74 20 64 61 | 74 75 6d 20 2a 61 72 67 |truct da|tum *arg|
|00004a90| 75 6d 65 6e 74 73 29 3b | 0a 0a 77 68 65 72 65 20 |uments);|..where |
|00004aa0| 49 20 69 6d 61 67 69 6e | 65 20 68 65 20 6d 65 61 |I imagin|e he mea|
|00004ab0| 6e 74 20 73 6f 6d 65 74 | 68 69 6e 67 20 6c 69 6b |nt somet|hing lik|
|00004ac0| 65 3a 0a 0a 20 20 76 6f | 69 64 20 61 70 70 6c 79 |e:.. vo|id apply|
|00004ad0| 28 73 74 72 75 63 74 20 | 64 61 74 75 6d 20 76 61 |(struct |datum va|
|00004ae0| 6c 2c 20 76 6f 69 64 20 | 28 2a 66 75 6e 63 29 28 |l, void |(*func)(|
|00004af0| 29 2c 20 73 74 72 75 63 | 74 20 64 61 74 75 6d 20 |), struc|t datum |
|00004b00| 2a 61 72 67 73 29 3b 0a | 0a 54 68 65 6e 20 49 20 |*args);.|.Then I |
|00004b10| 77 72 6f 74 65 3a 0a 3e | 20 20 73 74 61 74 69 63 |wrote:.>| static|
|00004b20| 20 64 6f 75 62 6c 65 20 | 64 6f 75 62 6c 65 5f 69 | double |double_i|
|00004b30| 64 65 6e 74 69 74 79 5f | 66 75 6e 63 74 69 6f 6e |dentity_|function|
|00004b40| 28 78 29 20 7b 20 72 65 | 74 75 72 6e 28 78 29 3b |(x) { re|turn(x);|
|00004b50| 20 7d 0a 0a 6d 65 61 6e | 69 6e 67 2c 20 6f 66 20 | }..mean|ing, of |
|00004b60| 63 6f 75 72 73 65 2c 0a | 0a 20 20 73 74 61 74 69 |course,.|. stati|
|00004b70| 63 20 64 6f 75 62 6c 65 | 20 64 6f 75 62 6c 65 5f |c double| double_|
|00004b80| 69 64 65 6e 74 69 74 79 | 5f 66 75 6e 63 74 69 6f |identity|_functio|
|00004b90| 6e 28 64 6f 75 62 6c 65 | 20 78 29 20 7b 20 72 65 |n(double| x) { re|
|00004ba0| 74 75 72 6e 28 78 29 3b | 20 7d 0a 0a 2d 50 42 0a |turn(x);| }..-PB.|
|00004bb0| 0a 44 61 74 65 3a 20 53 | 61 74 2c 20 32 33 20 4a |.Date: S|at, 23 J|
|00004bc0| 61 6e 20 39 33 20 31 37 | 3a 30 31 3a 30 34 20 2d |an 93 17|:01:04 -|
|00004bd0| 30 36 30 30 0a 46 72 6f | 6d 3a 20 62 75 72 63 68 |0600.Fro|m: burch|
|00004be0| 61 72 64 40 67 65 6f 6d | 2e 75 6d 6e 2e 65 64 75 |ard@geom|.umn.edu|
|00004bf0| 0a 54 6f 3a 20 67 6e 75 | 2d 6f 62 6a 63 40 70 72 |.To: gnu|-objc@pr|
|00004c00| 65 70 2e 61 69 2e 6d 69 | 74 2e 65 64 75 0a 53 75 |ep.ai.mi|t.edu.Su|
|00004c10| 62 6a 65 63 74 3a 20 52 | 65 3a 20 54 68 65 20 66 |bject: R|e: The f|
|00004c20| 6f 72 77 61 72 64 2f 70 | 65 72 66 6f 72 6d 76 20 |orward/p|erformv |
|00004c30| 50 75 7a 7a 6c 65 20 5b | 63 6f 72 72 65 63 74 65 |Puzzle [|correcte|
|00004c40| 64 5d 0a 0a 5b 20 43 6f | 72 72 65 63 74 65 64 20 |d]..[ Co|rrected |
|00004c50| 76 65 72 73 69 6f 6e 20 | 6f 66 20 6d 79 20 65 61 |version |of my ea|
|00004c60| 72 6c 69 65 72 20 6c 65 | 74 74 65 72 2e 20 5d 0a |rlier le|tter. ].|
|00004c70| 0a 52 69 63 68 61 72 64 | 20 53 74 61 6c 6c 6d 61 |.Richard| Stallma|
|00004c80| 6e 20 70 72 6f 70 6f 73 | 65 73 3a 0a 3e 20 20 76 |n propos|es:.> v|
|00004c90| 6f 69 64 20 61 70 70 6c | 79 20 28 73 74 72 75 63 |oid appl|y (struc|
|00004ca0| 74 20 64 61 74 75 6d 20 | 76 61 6c 75 65 2c 20 73 |t datum |value, s|
|00004cb0| 74 72 75 63 74 20 64 61 | 74 75 6d 20 2a 61 72 67 |truct da|tum *arg|
|00004cc0| 75 6d 65 6e 74 73 29 3b | 0a 0a 49 27 6d 20 61 73 |uments);|..I'm as|
|00004cd0| 73 75 6d 69 6e 67 20 74 | 68 61 74 20 68 65 20 6d |suming t|hat he m|
|00004ce0| 65 61 6e 74 3a 0a 0a 20 | 20 76 6f 69 64 20 61 70 |eant:.. | void ap|
|00004cf0| 70 6c 79 28 73 74 72 75 | 63 74 20 64 61 74 75 6d |ply(stru|ct datum|
|00004d00| 20 76 61 6c 2c 20 76 6f | 69 64 20 28 2a 66 75 6e | val, vo|id (*fun|
|00004d10| 63 29 28 29 2c 20 73 74 | 72 75 63 74 20 64 61 74 |c)(), st|ruct dat|
|00004d20| 75 6d 20 2a 61 72 67 73 | 29 3b 0a 0a 54 68 65 20 |um *args|);..The |
|00004d30| 61 62 6f 76 65 20 69 73 | 20 77 68 61 74 20 69 73 |above is| what is|
|00004d40| 20 6e 65 65 64 65 64 20 | 66 6f 72 20 70 65 72 66 | needed |for perf|
|00004d50| 6f 72 6d 76 2e 20 20 46 | 6f 72 20 66 6f 72 77 61 |ormv. F|or forwa|
|00004d60| 72 64 69 6e 67 20 28 61 | 6e 64 20 74 6f 20 67 65 |rding (a|nd to ge|
|00004d70| 74 0a 74 68 65 20 66 75 | 6c 6c 20 62 65 6e 65 66 |t.the fu|ll benef|
|00004d80| 69 74 20 6f 66 20 74 68 | 65 20 61 62 6f 76 65 20 |it of th|e above |
|00004d90| 66 61 63 69 6c 69 74 79 | 29 20 74 68 65 20 6f 70 |facility|) the op|
|00004da0| 70 6f 73 69 74 65 20 63 | 61 70 61 62 69 6c 69 74 |posite c|apabilit|
|00004db0| 79 20 69 73 0a 61 6c 73 | 6f 20 72 65 71 75 69 72 |y is.als|o requir|
|00004dc0| 65 64 2d 2d 2d 6e 61 6d | 65 6c 79 2c 20 74 68 65 |ed---nam|ely, the|
|00004dd0| 20 61 62 69 6c 69 74 79 | 20 66 6f 72 20 61 20 73 | ability| for a s|
|00004de0| 69 6e 67 6c 65 20 66 75 | 6e 63 74 69 6f 6e 20 74 |ingle fu|nction t|
|00004df0| 6f 20 72 65 63 65 69 76 | 65 0a 63 61 6c 6c 73 20 |o receiv|e.calls |
|00004e00| 69 73 73 75 65 64 20 77 | 69 74 68 20 76 61 72 79 |issued w|ith vary|
|00004e10| 69 6e 67 20 70 72 6f 74 | 6f 74 79 70 65 73 2e 20 |ing prot|otypes. |
|00004e20| 20 54 68 69 73 20 77 69 | 6c 6c 20 72 65 71 75 69 | This wi|ll requi|
|00004e30| 72 65 20 74 77 6f 0a 22 | 66 75 6e 63 74 69 6f 6e |re two."|function|
|00004e40| 73 22 0a 0a 20 20 76 6f | 69 64 20 67 65 74 5f 61 |s".. vo|id get_a|
|00004e50| 72 67 73 28 73 74 72 75 | 63 74 20 64 61 74 75 6d |rgs(stru|ct datum|
|00004e60| 20 2a 61 72 67 75 6d 65 | 6e 74 73 29 3b 0a 0a 20 | *argume|nts);.. |
|00004e70| 20 76 6f 69 64 20 70 75 | 74 5f 72 65 74 75 72 6e | void pu|t_return|
|00004e80| 28 73 74 72 75 63 74 20 | 64 61 74 75 6d 20 76 61 |(struct |datum va|
|00004e90| 6c 75 65 29 3b 0a 0a 49 | 6e 20 62 6f 74 68 20 63 |lue);..I|n both c|
|00004ea0| 61 73 65 73 2c 20 79 6f | 75 27 64 20 73 75 70 70 |ases, yo|u'd supp|
|00004eb0| 6c 79 20 74 79 70 65 20 | 69 6e 66 6f 72 6d 61 74 |ly type |informat|
|00004ec0| 69 6f 6e 3b 20 69 6e 20 | 70 75 74 5f 72 65 74 75 |ion; in |put_retu|
|00004ed0| 72 6e 28 29 20 79 6f 75 | 27 64 20 61 6c 73 6f 20 |rn() you|'d also |
|00004ee0| 73 75 70 70 6c 79 20 74 | 68 65 20 76 61 6c 75 65 |supply t|he value|
|00004ef0| 2e 0a 0a 49 6e 20 67 65 | 6e 65 72 61 6c 2c 20 74 |...In ge|neral, t|
|00004f00| 68 65 73 65 20 74 77 6f | 20 63 61 6e 6e 6f 74 20 |hese two| cannot |
|00004f10| 62 65 20 68 6f 6e 65 73 | 74 20 66 75 6e 63 74 69 |be hones|t functi|
|00004f20| 6f 6e 20 63 61 6c 6c 73 | 2c 20 73 69 6e 63 65 20 |on calls|, since |
|00004f30| 66 6f 72 0a 65 78 61 6d | 70 6c 65 20 67 65 74 5f |for.exam|ple get_|
|00004f40| 61 72 67 73 28 29 20 63 | 6f 6e 74 61 69 6e 73 20 |args() c|ontains |
|00004f50| 61 6e 20 69 6d 70 6c 69 | 63 69 74 20 5f 5f 62 75 |an impli|cit __bu|
|00004f60| 69 6c 74 69 6e 5f 73 61 | 76 65 72 65 67 73 28 29 |iltin_sa|veregs()|
|00004f70| 2e 0a 53 6f 6d 65 74 69 | 6d 65 73 20 6b 6c 75 64 |..Someti|mes klud|
|00004f80| 67 65 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |ges are |availabl|
|00004f90| 65 20 74 6f 20 61 76 6f | 69 64 20 61 73 73 65 6d |e to avo|id assem|
|00004fa0| 62 6c 65 72 20 69 6e 73 | 65 72 74 69 6f 6e 2c 20 |bler ins|ertion, |
|00004fb0| 74 68 6f 75 67 68 2e 0a | 46 6f 72 20 65 78 61 6d |though..|For exam|
|00004fc0| 70 6c 65 2c 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |ple, the| followi|
|00004fd0| 6e 67 20 68 61 63 6b 20 | 74 72 69 63 6b 73 20 6d |ng hack |tricks m|
|00004fe0| 61 6e 79 20 70 6c 61 74 | 66 6f 72 6d 73 20 69 6e |any plat|forms in|
|00004ff0| 74 6f 20 72 65 74 75 72 | 6e 69 6e 67 20 61 0a 64 |to retur|ning a.d|
|00005000| 6f 75 62 6c 65 20 66 72 | 6f 6d 20 61 20 6e 6f 6d |ouble fr|om a nom|
|00005010| 69 6e 61 6c 20 33 32 2d | 62 69 74 20 66 75 6e 63 |inal 32-|bit func|
|00005020| 74 69 6f 6e 3a 0a 0a 20 | 20 23 64 65 66 69 6e 65 |tion:.. | #define|
|00005030| 20 52 45 54 55 52 4e 5f | 44 4f 55 42 4c 45 28 78 | RETURN_|DOUBLE(x|
|00005040| 29 09 09 09 09 5c 0a 09 | 28 7b 09 09 09 09 09 09 |)....\..|({......|
|00005050| 5c 0a 09 64 6f 75 62 6c | 65 20 72 74 6e 20 3d 20 |\..doubl|e rtn = |
|00005060| 78 3b 09 09 09 09 09 5c | 0a 09 75 6e 73 69 67 6e |x;.....\|..unsign|
|00005070| 65 64 20 69 6e 74 20 66 | 61 6b 65 20 3d 20 2a 28 |ed int f|ake = *(|
|00005080| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 2a 29 26 |unsigned| int *)&|
|00005090| 72 74 6e 3b 09 5c 0a 09 | 64 6f 75 62 6c 65 5f 69 |rtn;.\..|double_i|
|000050a0| 64 65 6e 74 69 74 79 5f | 66 75 6e 63 74 69 6f 6e |dentity_|function|
|000050b0| 28 72 74 6e 29 3b 09 09 | 09 5c 0a 09 72 65 74 75 |(rtn);..|.\..retu|
|000050c0| 72 6e 28 66 61 6b 65 29 | 3b 09 09 09 09 09 5c 0a |rn(fake)|;.....\.|
|000050d0| 09 7d 29 0a 0a 20 20 2f | 2a 20 64 6f 6e 27 74 20 |.}).. /|* don't |
|000050e0| 69 6e 6c 69 6e 65 20 74 | 68 69 73 20 2a 2f 0a 20 |inline t|his */. |
|000050f0| 20 73 74 61 74 69 63 20 | 64 6f 75 62 6c 65 20 64 | static |double d|
|00005100| 6f 75 62 6c 65 5f 69 64 | 65 6e 74 69 74 79 5f 66 |ouble_id|entity_f|
|00005110| 75 6e 63 74 69 6f 6e 28 | 64 6f 75 62 6c 65 20 78 |unction(|double x|
|00005120| 29 20 7b 20 72 65 74 75 | 72 6e 28 78 29 3b 20 7d |) { retu|rn(x); }|
|00005130| 0a 0a 0a 52 69 63 68 61 | 72 64 20 66 75 72 74 68 |...Richa|rd furth|
|00005140| 65 72 20 70 72 6f 70 6f | 73 65 73 3a 0a 3e 20 20 |er propo|ses:.> |
|00005150| 73 74 72 75 63 74 20 64 | 61 74 75 6d 20 7b 20 69 |struct d|atum { i|
|00005160| 6e 74 20 74 79 70 65 63 | 6c 61 73 73 3b 20 69 6e |nt typec|lass; in|
|00005170| 74 20 73 69 7a 65 3b 20 | 76 6f 69 64 20 2a 61 64 |t size; |void *ad|
|00005180| 64 72 65 73 73 3b 20 7d | 3b 0a 0a 49 20 64 6f 6e |dress; }|;..I don|
|00005190| 27 74 20 74 68 69 6e 6b | 20 74 68 69 73 20 6d 61 |'t think| this ma|
|000051a0| 63 68 69 6e 65 2d 73 70 | 65 63 69 66 69 63 20 65 |chine-sp|ecific e|
|000051b0| 6e 63 6f 64 69 6e 67 20 | 69 73 20 63 75 72 72 65 |ncoding |is curre|
|000051c0| 6e 74 6c 79 20 61 63 63 | 65 73 73 69 62 6c 65 0a |ntly acc|essible.|
|000051d0| 61 74 20 72 75 6e 2d 74 | 69 6d 65 2c 20 62 65 63 |at run-t|ime, bec|
|000051e0| 61 75 73 65 20 5f 5f 62 | 75 69 6c 74 69 6e 5f 63 |ause __b|uiltin_c|
|000051f0| 6c 61 73 73 69 66 79 5f | 74 79 70 65 28 29 20 69 |lassify_|type() i|
|00005200| 73 20 6f 66 20 6e 65 63 | 65 73 73 69 74 79 20 61 |s of nec|essity a|
|00005210| 0a 63 6f 6d 70 69 6c 65 | 72 20 64 69 72 65 63 74 |.compile|r direct|
|00005220| 69 76 65 20 72 61 74 68 | 65 72 20 74 68 61 6e 20 |ive rath|er than |
|00005230| 61 6e 20 68 6f 6e 65 73 | 74 20 66 75 6e 63 74 69 |an hones|t functi|
|00005240| 6f 6e 20 63 61 6c 6c 20 | 28 64 75 65 20 74 6f 20 |on call |(due to |
|00005250| 74 68 65 20 77 61 79 0a | 69 74 20 69 73 20 22 63 |the way.|it is "c|
|00005260| 61 6c 6c 65 64 22 29 2e | 0a 0a 49 20 74 68 69 6e |alled").|..I thin|
|00005270| 6b 20 77 68 61 74 20 69 | 73 20 6e 65 65 64 65 64 |k what i|s needed|
|00005280| 20 68 65 72 65 20 69 73 | 20 61 20 73 69 6d 70 6c | here is| a simpl|
|00005290| 65 2c 20 70 6f 72 74 61 | 62 6c 65 20 74 79 70 65 |e, porta|ble type|
|000052a0| 0a 65 6e 63 6f 64 69 6e | 67 2d 2d 2d 77 68 69 63 |.encodin|g---whic|
|000052b0| 68 20 63 6f 6e 76 65 6e | 69 65 6e 74 6c 79 20 65 |h conven|iently e|
|000052c0| 6e 6f 75 67 68 20 61 6c | 72 65 61 64 79 20 65 78 |nough al|ready ex|
|000052d0| 69 73 74 73 2e 20 20 54 | 68 65 20 4f 62 6a 65 63 |ists. T|he Objec|
|000052e0| 74 69 76 65 2d 43 0a 72 | 75 6e 74 69 6d 65 20 75 |tive-C.r|untime u|
|000052f0| 73 65 73 20 61 20 73 69 | 6d 70 6c 65 20 73 74 72 |ses a si|mple str|
|00005300| 69 6e 67 20 65 6e 63 6f | 64 69 6e 67 20 77 68 69 |ing enco|ding whi|
|00005310| 63 68 20 63 6f 76 65 72 | 73 20 61 6c 6c 20 70 6f |ch cover|s all po|
|00005320| 73 73 69 62 6c 65 20 43 | 0a 74 79 70 65 73 2c 20 |ssible C|.types, |
|00005330| 69 6e 63 6c 75 64 69 6e | 67 20 63 6f 6d 70 6f 75 |includin|g compou|
|00005340| 6e 64 20 74 79 70 65 73 | 2e 20 20 53 6f 20 49 27 |nd types|. So I'|
|00005350| 64 20 73 75 67 67 65 73 | 74 0a 0a 20 20 73 74 72 |d sugges|t.. str|
|00005360| 75 63 74 20 64 61 74 75 | 6d 20 7b 20 63 6f 6e 73 |uct datu|m { cons|
|00005370| 74 20 63 68 61 72 20 2a | 74 79 70 65 64 65 73 63 |t char *|typedesc|
|00005380| 3b 20 76 6f 69 64 20 2a | 61 64 64 72 65 73 73 3b |; void *|address;|
|00005390| 20 7d 3b 0a 0a 59 6f 75 | 27 64 20 6e 65 65 64 20 | };..You|'d need |
|000053a0| 74 6f 20 77 72 69 74 65 | 20 61 20 6c 69 62 72 61 |to write| a libra|
|000053b0| 72 79 20 66 75 6e 63 74 | 69 6f 6e 20 74 6f 20 63 |ry funct|ion to c|
|000053c0| 6f 6e 76 65 72 74 20 74 | 68 69 73 20 74 6f 20 74 |onvert t|his to t|
|000053d0| 68 65 0a 6d 61 63 68 69 | 6e 65 2d 73 70 65 63 69 |he.machi|ne-speci|
|000053e0| 66 69 63 20 66 6f 72 6d | 2c 20 62 75 74 20 74 68 |fic form|, but th|
|000053f0| 65 20 63 6f 64 65 20 66 | 6f 72 20 69 74 20 77 6f |e code f|or it wo|
|00005400| 75 6c 64 20 62 65 20 73 | 69 6d 70 6c 65 2c 20 61 |uld be s|imple, a|
|00005410| 6e 64 0a 6d 6f 72 65 2d | 6f 72 2d 6c 65 73 73 20 |nd.more-|or-less |
|00005420| 78 65 72 6f 78 65 64 20 | 66 72 6f 6d 20 42 55 49 |xeroxed |from BUI|
|00005430| 4c 54 5f 49 4e 5f 43 4c | 41 53 53 49 46 59 5f 54 |LT_IN_CL|ASSIFY_T|
|00005440| 59 50 45 2e 20 20 41 63 | 74 75 61 6c 6c 79 2c 20 |YPE. Ac|tually, |
|00005450| 66 6f 72 0a 62 65 74 74 | 65 72 20 65 66 66 69 63 |for.bett|er effic|
|00005460| 69 65 6e 63 79 2c 20 77 | 65 20 63 6f 75 6c 64 20 |iency, w|e could |
|00005470| 65 76 65 6e 20 6c 65 61 | 76 65 20 73 70 61 63 65 |even lea|ve space|
|00005480| 20 69 6e 20 74 68 65 20 | 64 61 74 75 6d 20 73 74 | in the |datum st|
|00005490| 72 75 63 74 75 72 65 0a | 66 6f 72 20 63 61 63 68 |ructure.|for cach|
|000054a0| 69 6e 67 20 74 68 65 20 | 6d 61 63 68 69 6e 65 2d |ing the |machine-|
|000054b0| 73 70 65 63 69 66 69 63 | 20 69 6e 66 6f 3a 0a 0a |specific| info:..|
|000054c0| 20 20 73 74 72 75 63 74 | 20 64 61 74 75 6d 0a 20 | struct| datum. |
|000054d0| 20 7b 0a 20 20 09 2f 2a | 20 55 73 65 72 2d 6c 65 | {. ./*| User-le|
|000054e0| 76 65 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |vel info|rmation |
|000054f0| 2a 2f 0a 20 20 09 63 6f | 6e 73 74 20 63 68 61 72 |*/. .co|nst char|
|00005500| 20 2a 74 79 70 65 64 65 | 73 63 3b 0a 09 76 6f 69 | *typede|sc;..voi|
|00005510| 64 20 2a 61 64 64 72 65 | 73 73 3b 0a 0a 09 2f 2a |d *addre|ss;.../*|
|00005520| 20 53 79 73 74 65 6d 2d | 63 61 63 68 65 64 20 69 | System-|cached i|
|00005530| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 2a 2f 0a 09 69 |nformati|on */..i|
|00005540| 6e 74 20 74 79 70 65 63 | 6c 61 73 73 3b 0a 09 69 |nt typec|lass;..i|
|00005550| 6e 74 20 73 69 7a 65 3b | 0a 20 20 7d 3b 0a 0a 2d |nt size;|. };..-|
|00005560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000055a0| 2d 2d 2d 0a 50 61 75 6c | 20 42 75 72 63 68 61 72 |---.Paul| Burchar|
|000055b0| 64 09 3c 62 75 72 63 68 | 61 72 64 40 67 65 6f 6d |d.<burch|ard@geom|
|000055c0| 2e 75 6d 6e 2e 65 64 75 | 3e 0a 60 60 49 27 6d 20 |.umn.edu|>.``I'm |
|000055d0| 73 74 69 6c 6c 20 6c 65 | 61 72 6e 69 6e 67 20 68 |still le|arning h|
|000055e0| 6f 77 20 74 6f 20 63 6f | 75 6e 74 20 62 61 63 6b |ow to co|unt back|
|000055f0| 77 61 72 64 73 20 66 72 | 6f 6d 20 69 6e 66 69 6e |wards fr|om infin|
|00005600| 69 74 79 2e 2e 2e 27 27 | 0a 2d 2d 2d 2d 2d 2d 2d |ity...''|.-------|
|00005610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005620| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005630| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005640| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 0a 0a |--------|-----...|
|00005650| 44 61 74 65 3a 20 53 61 | 74 2c 20 32 33 20 4a 61 |Date: Sa|t, 23 Ja|
|00005660| 6e 20 39 33 20 31 35 3a | 32 30 3a 32 30 20 2d 30 |n 93 15:|20:20 -0|
|00005670| 36 30 30 0a 46 72 6f 6d | 3a 20 62 75 72 63 68 61 |600.From|: burcha|
|00005680| 72 64 40 67 65 6f 6d 2e | 75 6d 6e 2e 65 64 75 0a |rd@geom.|umn.edu.|
|00005690| 54 6f 3a 20 72 6d 73 40 | 67 6e 75 2e 61 69 2e 6d |To: rms@|gnu.ai.m|
|000056a0| 69 74 2e 65 64 75 20 28 | 52 69 63 68 61 72 64 20 |it.edu (|Richard |
|000056b0| 53 74 61 6c 6c 6d 61 6e | 29 0a 53 75 62 6a 65 63 |Stallman|).Subjec|
|000056c0| 74 3a 20 52 65 3a 20 54 | 68 65 20 66 6f 72 77 61 |t: Re: T|he forwa|
|000056d0| 72 64 2f 70 65 72 66 6f | 72 6d 76 20 50 75 7a 7a |rd/perfo|rmv Puzz|
|000056e0| 6c 65 0a 43 63 3a 20 67 | 6e 75 2d 6f 62 6a 63 40 |le.Cc: g|nu-objc@|
|000056f0| 70 72 65 70 2e 61 69 2e | 6d 69 74 2e 65 64 75 0a |prep.ai.|mit.edu.|
|00005700| 0a 52 69 63 68 61 72 64 | 20 53 74 61 6c 6c 6d 61 |.Richard| Stallma|
|00005710| 6e 20 70 72 6f 70 6f 73 | 65 73 3a 0a 3e 20 20 76 |n propos|es:.> v|
|00005720| 6f 69 64 20 61 70 70 6c | 79 20 28 73 74 72 75 63 |oid appl|y (struc|
|00005730| 74 20 64 61 74 75 6d 20 | 76 61 6c 75 65 2c 20 73 |t datum |value, s|
|00005740| 74 72 75 63 74 20 64 61 | 74 75 6d 20 2a 61 72 67 |truct da|tum *arg|
|00005750| 75 6d 65 6e 74 73 29 3b | 0a 0a 54 68 65 20 61 62 |uments);|..The ab|
|00005760| 6f 76 65 20 69 73 20 77 | 68 61 74 20 69 73 20 6e |ove is w|hat is n|
|00005770| 65 65 64 65 64 20 66 6f | 72 20 70 65 72 66 6f 72 |eeded fo|r perfor|
|00005780| 6d 76 2e 20 20 46 6f 72 | 20 66 6f 72 77 61 72 64 |mv. For| forward|
|00005790| 69 6e 67 20 28 61 6e 64 | 20 74 6f 20 67 65 74 0a |ing (and| to get.|
|000057a0| 74 68 65 20 66 75 6c 6c | 20 62 65 6e 65 66 69 74 |the full| benefit|
|000057b0| 20 6f 66 20 74 68 65 20 | 61 62 6f 76 65 20 66 61 | of the |above fa|
|000057c0| 63 69 6c 69 74 79 29 20 | 74 68 65 20 6f 70 70 6f |cility) |the oppo|
|000057d0| 73 69 74 65 20 63 61 70 | 61 62 69 6c 69 74 79 20 |site cap|ability |
|000057e0| 69 73 0a 61 6c 73 6f 20 | 72 65 71 75 69 72 65 64 |is.also |required|
|000057f0| 2d 2d 2d 6e 61 6d 65 6c | 79 2c 20 74 68 65 20 61 |---namel|y, the a|
|00005800| 62 69 6c 69 74 79 20 66 | 6f 72 20 61 20 73 69 6e |bility f|or a sin|
|00005810| 67 6c 65 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 |gle func|tion to |
|00005820| 72 65 63 65 69 76 65 0a | 63 61 6c 6c 73 20 69 73 |receive.|calls is|
|00005830| 73 75 65 64 20 77 69 74 | 68 20 76 61 72 79 69 6e |sued wit|h varyin|
|00005840| 67 20 70 72 6f 74 6f 74 | 79 70 65 73 2e 20 20 54 |g protot|ypes. T|
|00005850| 68 69 73 20 77 69 6c 6c | 20 72 65 71 75 69 72 65 |his will| require|
|00005860| 20 74 77 6f 0a 22 66 75 | 6e 63 74 69 6f 6e 73 22 | two."fu|nctions"|
|00005870| 0a 0a 20 20 76 6f 69 64 | 20 67 65 74 5f 61 72 67 |.. void| get_arg|
|00005880| 73 28 73 74 72 75 63 74 | 20 64 61 74 75 6d 20 2a |s(struct| datum *|
|00005890| 61 72 67 75 6d 65 6e 74 | 73 29 3b 0a 0a 20 20 76 |argument|s);.. v|
|000058a0| 6f 69 64 20 70 75 74 5f | 72 65 74 75 72 6e 28 73 |oid put_|return(s|
|000058b0| 74 72 75 63 74 20 64 61 | 74 75 6d 20 76 61 6c 75 |truct da|tum valu|
|000058c0| 65 29 3b 0a 0a 49 6e 20 | 62 6f 74 68 20 63 61 73 |e);..In |both cas|
|000058d0| 65 73 2c 20 79 6f 75 27 | 64 20 73 75 70 70 6c 79 |es, you'|d supply|
|000058e0| 20 74 79 70 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | type in|formatio|
|000058f0| 6e 3b 20 69 6e 20 70 75 | 74 5f 72 65 74 75 72 6e |n; in pu|t_return|
|00005900| 28 29 20 79 6f 75 27 64 | 0a 61 6c 73 6f 20 73 75 |() you'd|.also su|
|00005910| 70 70 6c 79 20 74 68 65 | 20 76 61 6c 75 65 2e 0a |pply the| value..|
|00005920| 0a 49 6e 20 67 65 6e 65 | 72 61 6c 2c 20 74 68 65 |.In gene|ral, the|
|00005930| 73 65 20 74 77 6f 20 63 | 61 6e 6e 6f 74 20 62 65 |se two c|annot be|
|00005940| 20 68 6f 6e 65 73 74 20 | 66 75 6e 63 74 69 6f 6e | honest |function|
|00005950| 20 63 61 6c 6c 73 2c 20 | 73 69 6e 63 65 20 66 6f | calls, |since fo|
|00005960| 72 0a 65 78 61 6d 70 6c | 65 20 67 65 74 5f 61 72 |r.exampl|e get_ar|
|00005970| 67 73 28 29 20 63 6f 6e | 74 61 69 6e 73 20 61 6e |gs() con|tains an|
|00005980| 20 69 6d 70 6c 69 63 69 | 74 20 5f 5f 62 75 69 6c | implici|t __buil|
|00005990| 74 69 6e 5f 73 61 76 65 | 72 65 67 73 28 29 2e 0a |tin_save|regs()..|
|000059a0| 53 6f 6d 65 74 69 6d 65 | 73 20 6b 6c 75 64 67 65 |Sometime|s kludge|
|000059b0| 73 20 61 72 65 20 61 76 | 61 69 6c 61 62 6c 65 20 |s are av|ailable |
|000059c0| 74 6f 20 61 76 6f 69 64 | 20 61 73 73 65 6d 62 6c |to avoid| assembl|
|000059d0| 65 72 20 69 6e 73 65 72 | 74 69 6f 6e 2c 20 74 68 |er inser|tion, th|
|000059e0| 6f 75 67 68 2e 0a 46 6f | 72 20 65 78 61 6d 70 6c |ough..Fo|r exampl|
|000059f0| 65 2c 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |e, the f|ollowing|
|00005a00| 20 68 61 63 6b 20 74 72 | 69 63 6b 73 20 6d 61 6e | hack tr|icks man|
|00005a10| 79 20 70 6c 61 74 66 6f | 72 6d 73 20 69 6e 74 6f |y platfo|rms into|
|00005a20| 20 72 65 74 75 72 6e 69 | 6e 67 20 61 0a 64 6f 75 | returni|ng a.dou|
|00005a30| 62 6c 65 20 66 72 6f 6d | 20 61 20 6e 6f 6d 69 6e |ble from| a nomin|
|00005a40| 61 6c 20 33 32 2d 62 69 | 74 20 66 75 6e 63 74 69 |al 32-bi|t functi|
|00005a50| 6f 6e 3a 0a 0a 20 20 23 | 64 65 66 69 6e 65 20 52 |on:.. #|define R|
|00005a60| 45 54 55 52 4e 5f 44 4f | 55 42 4c 45 28 78 29 09 |ETURN_DO|UBLE(x).|
|00005a70| 09 09 09 5c 0a 09 28 7b | 09 09 09 09 09 09 5c 0a |...\..({|......\.|
|00005a80| 09 64 6f 75 62 6c 65 20 | 72 74 6e 20 3d 20 78 3b |.double |rtn = x;|
|00005a90| 09 09 09 09 09 5c 0a 09 | 75 6e 73 69 67 6e 65 64 |.....\..|unsigned|
|00005aa0| 20 69 6e 74 20 66 61 6b | 65 20 3d 20 2a 28 75 6e | int fak|e = *(un|
|00005ab0| 73 69 67 6e 65 64 20 69 | 6e 74 20 2a 29 26 72 74 |signed i|nt *)&rt|
|00005ac0| 6e 3b 09 5c 0a 09 64 6f | 75 62 6c 65 5f 69 64 65 |n;.\..do|uble_ide|
|00005ad0| 6e 74 69 74 79 5f 66 75 | 6e 63 74 69 6f 6e 28 72 |ntity_fu|nction(r|
|00005ae0| 74 6e 29 3b 09 09 09 5c | 0a 09 72 65 74 75 72 6e |tn);...\|..return|
|00005af0| 28 66 61 6b 65 29 3b 09 | 09 09 09 09 5c 0a 09 7d |(fake);.|....\..}|
|00005b00| 29 0a 0a 20 20 2f 2a 20 | 64 6f 6e 27 74 20 69 6e |).. /* |don't in|
|00005b10| 6c 69 6e 65 20 74 68 69 | 73 20 2a 2f 0a 20 20 73 |line thi|s */. s|
|00005b20| 74 61 74 69 63 20 64 6f | 75 62 6c 65 20 64 6f 75 |tatic do|uble dou|
|00005b30| 62 6c 65 5f 69 64 65 6e | 74 69 74 79 5f 66 75 6e |ble_iden|tity_fun|
|00005b40| 63 74 69 6f 6e 28 78 29 | 20 7b 20 72 65 74 75 72 |ction(x)| { retur|
|00005b50| 6e 28 78 29 3b 20 7d 0a | 0a 0a 52 69 63 68 61 72 |n(x); }.|..Richar|
|00005b60| 64 20 66 75 72 74 68 65 | 72 20 70 72 6f 70 6f 73 |d furthe|r propos|
|00005b70| 65 73 3a 0a 3e 20 20 73 | 74 72 75 63 74 20 64 61 |es:.> s|truct da|
|00005b80| 74 75 6d 20 7b 20 69 6e | 74 20 74 79 70 65 63 6c |tum { in|t typecl|
|00005b90| 61 73 73 3b 20 69 6e 74 | 20 73 69 7a 65 3b 20 76 |ass; int| size; v|
|00005ba0| 6f 69 64 20 2a 61 64 64 | 72 65 73 73 3b 20 7d 3b |oid *add|ress; };|
|00005bb0| 0a 0a 49 20 64 6f 6e 27 | 74 20 74 68 69 6e 6b 20 |..I don'|t think |
|00005bc0| 74 68 69 73 20 6d 61 63 | 68 69 6e 65 2d 73 70 65 |this mac|hine-spe|
|00005bd0| 63 69 66 69 63 20 65 6e | 63 6f 64 69 6e 67 20 69 |cific en|coding i|
|00005be0| 73 20 63 75 72 72 65 6e | 74 6c 79 20 61 63 63 65 |s curren|tly acce|
|00005bf0| 73 73 69 62 6c 65 0a 61 | 74 20 72 75 6e 2d 74 69 |ssible.a|t run-ti|
|00005c00| 6d 65 2c 20 62 65 63 61 | 75 73 65 20 5f 5f 62 75 |me, beca|use __bu|
|00005c10| 69 6c 74 69 6e 5f 63 6c | 61 73 73 69 66 79 5f 74 |iltin_cl|assify_t|
|00005c20| 79 70 65 28 29 20 69 73 | 20 6f 66 20 6e 65 63 65 |ype() is| of nece|
|00005c30| 73 73 69 74 79 20 61 0a | 63 6f 6d 70 69 6c 65 72 |ssity a.|compiler|
|00005c40| 20 64 69 72 65 63 74 69 | 76 65 20 72 61 74 68 65 | directi|ve rathe|
|00005c50| 72 20 74 68 61 6e 20 61 | 6e 20 68 6f 6e 65 73 74 |r than a|n honest|
|00005c60| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 6c 6c 20 28 | functio|n call (|
|00005c70| 64 75 65 20 74 6f 20 74 | 68 65 20 77 61 79 0a 69 |due to t|he way.i|
|00005c80| 74 20 69 73 20 22 63 61 | 6c 6c 65 64 22 29 2e 0a |t is "ca|lled")..|
|00005c90| 0a 49 20 74 68 69 6e 6b | 20 77 68 61 74 20 69 73 |.I think| what is|
|00005ca0| 20 6e 65 65 64 65 64 20 | 68 65 72 65 20 69 73 20 | needed |here is |
|00005cb0| 61 20 73 69 6d 70 6c 65 | 2c 20 70 6f 72 74 61 62 |a simple|, portab|
|00005cc0| 6c 65 20 74 79 70 65 0a | 65 6e 63 6f 64 69 6e 67 |le type.|encoding|
|00005cd0| 2d 2d 2d 77 68 69 63 68 | 20 63 6f 6e 76 65 6e 69 |---which| conveni|
|00005ce0| 65 6e 74 6c 79 20 65 6e | 6f 75 67 68 20 61 6c 72 |ently en|ough alr|
|00005cf0| 65 61 64 79 20 65 78 69 | 73 74 73 2e 20 20 54 68 |eady exi|sts. Th|
|00005d00| 65 20 4f 62 6a 65 63 74 | 69 76 65 2d 43 0a 72 75 |e Object|ive-C.ru|
|00005d10| 6e 74 69 6d 65 20 75 73 | 65 73 20 61 20 73 69 6d |ntime us|es a sim|
|00005d20| 70 6c 65 20 73 74 72 69 | 6e 67 20 65 6e 63 6f 64 |ple stri|ng encod|
|00005d30| 69 6e 67 20 77 68 69 63 | 68 20 63 6f 76 65 72 73 |ing whic|h covers|
|00005d40| 20 61 6c 6c 20 70 6f 73 | 73 69 62 6c 65 20 43 0a | all pos|sible C.|
|00005d50| 74 79 70 65 73 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |types, i|ncluding|
|00005d60| 20 63 6f 6d 70 6f 75 6e | 64 20 74 79 70 65 73 2e | compoun|d types.|
|00005d70| 20 20 53 6f 20 49 27 64 | 20 73 75 67 67 65 73 74 | So I'd| suggest|
|00005d80| 0a 0a 20 20 73 74 72 75 | 63 74 20 64 61 74 75 6d |.. stru|ct datum|
|00005d90| 20 7b 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 74 | { const| char *t|
|00005da0| 79 70 65 64 65 73 63 3b | 20 76 6f 69 64 20 2a 61 |ypedesc;| void *a|
|00005db0| 64 64 72 65 73 73 3b 20 | 7d 3b 0a 0a 59 6f 75 27 |ddress; |};..You'|
|00005dc0| 64 20 6e 65 65 64 20 74 | 6f 20 77 72 69 74 65 20 |d need t|o write |
|00005dd0| 61 20 6c 69 62 72 61 72 | 79 20 66 75 6e 63 74 69 |a librar|y functi|
|00005de0| 6f 6e 20 74 6f 20 63 6f | 6e 76 65 72 74 20 74 68 |on to co|nvert th|
|00005df0| 69 73 20 74 6f 20 74 68 | 65 0a 6d 61 63 68 69 6e |is to th|e.machin|
|00005e00| 65 2d 73 70 65 63 69 66 | 69 63 20 66 6f 72 6d 2c |e-specif|ic form,|
|00005e10| 20 62 75 74 20 74 68 65 | 20 63 6f 64 65 20 66 6f | but the| code fo|
|00005e20| 72 20 69 74 20 77 6f 75 | 6c 64 20 62 65 20 73 69 |r it wou|ld be si|
|00005e30| 6d 70 6c 65 2c 20 61 6e | 64 0a 6d 6f 72 65 2d 6f |mple, an|d.more-o|
|00005e40| 72 2d 6c 65 73 73 20 78 | 65 72 6f 78 65 64 20 66 |r-less x|eroxed f|
|00005e50| 72 6f 6d 20 42 55 49 4c | 54 5f 49 4e 5f 43 4c 41 |rom BUIL|T_IN_CLA|
|00005e60| 53 53 49 46 59 5f 54 59 | 50 45 2e 20 20 41 63 74 |SSIFY_TY|PE. Act|
|00005e70| 75 61 6c 6c 79 2c 20 66 | 6f 72 0a 62 65 74 74 65 |ually, f|or.bette|
|00005e80| 72 20 65 66 66 69 63 69 | 65 6e 63 79 2c 20 77 65 |r effici|ency, we|
|00005e90| 20 63 6f 75 6c 64 20 65 | 76 65 6e 20 6c 65 61 76 | could e|ven leav|
|00005ea0| 65 20 73 70 61 63 65 20 | 69 6e 20 74 68 65 20 64 |e space |in the d|
|00005eb0| 61 74 75 6d 20 73 74 72 | 75 63 74 75 72 65 0a 66 |atum str|ucture.f|
|00005ec0| 6f 72 20 63 61 63 68 69 | 6e 67 20 74 68 65 20 6d |or cachi|ng the m|
|00005ed0| 61 63 68 69 6e 65 2d 73 | 70 65 63 69 66 69 63 20 |achine-s|pecific |
|00005ee0| 69 6e 66 6f 3a 0a 0a 20 | 20 73 74 72 75 63 74 20 |info:.. | struct |
|00005ef0| 64 61 74 75 6d 0a 20 20 | 7b 0a 20 20 09 2f 2a 20 |datum. |{. ./* |
|00005f00| 55 73 65 72 2d 6c 65 76 | 65 6c 20 69 6e 66 6f 72 |User-lev|el infor|
|00005f10| 6d 61 74 69 6f 6e 20 2a | 2f 0a 20 20 09 63 6f 6e |mation *|/. .con|
|00005f20| 73 74 20 63 68 61 72 20 | 2a 74 79 70 65 64 65 73 |st char |*typedes|
|00005f30| 63 3b 0a 09 76 6f 69 64 | 20 2a 61 64 64 72 65 73 |c;..void| *addres|
|00005f40| 73 3b 0a 0a 09 2f 2a 20 | 53 79 73 74 65 6d 2d 63 |s;.../* |System-c|
|00005f50| 61 63 68 65 64 20 69 6e | 66 6f 72 6d 61 74 69 6f |ached in|formatio|
|00005f60| 6e 20 2a 2f 0a 09 69 6e | 74 20 74 79 70 65 63 6c |n */..in|t typecl|
|00005f70| 61 73 73 3b 0a 09 69 6e | 74 20 73 69 7a 65 3b 0a |ass;..in|t size;.|
|00005f80| 20 20 7d 3b 0a 0a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | };..--|--------|
|00005f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005fc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 50 61 75 6c 20 |--------|--.Paul |
|00005fd0| 42 75 72 63 68 61 72 64 | 09 3c 62 75 72 63 68 61 |Burchard|.<burcha|
|00005fe0| 72 64 40 67 65 6f 6d 2e | 75 6d 6e 2e 65 64 75 3e |rd@geom.|umn.edu>|
|00005ff0| 0a 60 60 49 27 6d 20 73 | 74 69 6c 6c 20 6c 65 61 |.``I'm s|till lea|
|00006000| 72 6e 69 6e 67 20 68 6f | 77 20 74 6f 20 63 6f 75 |rning ho|w to cou|
|00006010| 6e 74 20 62 61 63 6b 77 | 61 72 64 73 20 66 72 6f |nt backw|ards fro|
|00006020| 6d 20 69 6e 66 69 6e 69 | 74 79 2e 2e 2e 27 27 0a |m infini|ty...''.|
|00006030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006040| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006070| 2d 2d 2d 2d 0a 0a 44 61 | 74 65 3a 20 53 61 74 2c |----..Da|te: Sat,|
|00006080| 20 32 33 20 4a 61 6e 20 | 39 33 20 31 35 3a 32 30 | 23 Jan |93 15:20|
|00006090| 3a 32 30 20 2d 30 36 30 | 30 0a 46 72 6f 6d 3a 20 |:20 -060|0.From: |
|000060a0| 62 75 72 63 68 61 72 64 | 40 67 65 6f 6d 2e 75 6d |burchard|@geom.um|
|000060b0| 6e 2e 65 64 75 0a 54 6f | 3a 20 72 6d 73 40 67 6e |n.edu.To|: rms@gn|
|000060c0| 75 2e 61 69 2e 6d 69 74 | 2e 65 64 75 20 28 52 69 |u.ai.mit|.edu (Ri|
|000060d0| 63 68 61 72 64 20 53 74 | 61 6c 6c 6d 61 6e 29 0a |chard St|allman).|
|000060e0| 53 75 62 6a 65 63 74 3a | 20 52 65 3a 20 54 68 65 |Subject:| Re: The|
|000060f0| 20 66 6f 72 77 61 72 64 | 2f 70 65 72 66 6f 72 6d | forward|/perform|
|00006100| 76 20 50 75 7a 7a 6c 65 | 0a 43 63 3a 20 67 6e 75 |v Puzzle|.Cc: gnu|
|00006110| 2d 6f 62 6a 63 40 70 72 | 65 70 2e 61 69 2e 6d 69 |-objc@pr|ep.ai.mi|
|00006120| 74 2e 65 64 75 0a 0a 52 | 69 63 68 61 72 64 20 53 |t.edu..R|ichard S|
|00006130| 74 61 6c 6c 6d 61 6e 20 | 70 72 6f 70 6f 73 65 73 |tallman |proposes|
|00006140| 3a 0a 3e 20 20 76 6f 69 | 64 20 61 70 70 6c 79 20 |:.> voi|d apply |
|00006150| 28 73 74 72 75 63 74 20 | 64 61 74 75 6d 20 76 61 |(struct |datum va|
|00006160| 6c 75 65 2c 20 73 74 72 | 75 63 74 20 64 61 74 75 |lue, str|uct datu|
|00006170| 6d 20 2a 61 72 67 75 6d | 65 6e 74 73 29 3b 0a 0a |m *argum|ents);..|
|00006180| 54 68 65 20 61 62 6f 76 | 65 20 69 73 20 77 68 61 |The abov|e is wha|
|00006190| 74 20 69 73 20 6e 65 65 | 64 65 64 20 66 6f 72 20 |t is nee|ded for |
|000061a0| 70 65 72 66 6f 72 6d 76 | 2e 20 20 46 6f 72 20 66 |performv|. For f|
|000061b0| 6f 72 77 61 72 64 69 6e | 67 20 28 61 6e 64 20 74 |orwardin|g (and t|
|000061c0| 6f 20 67 65 74 0a 74 68 | 65 20 66 75 6c 6c 20 62 |o get.th|e full b|
|000061d0| 65 6e 65 66 69 74 20 6f | 66 20 74 68 65 20 61 62 |enefit o|f the ab|
|000061e0| 6f 76 65 20 66 61 63 69 | 6c 69 74 79 29 20 74 68 |ove faci|lity) th|
|000061f0| 65 20 6f 70 70 6f 73 69 | 74 65 20 63 61 70 61 62 |e opposi|te capab|
|00006200| 69 6c 69 74 79 20 69 73 | 0a 61 6c 73 6f 20 72 65 |ility is|.also re|
|00006210| 71 75 69 72 65 64 2d 2d | 2d 6e 61 6d 65 6c 79 2c |quired--|-namely,|
|00006220| 20 74 68 65 20 61 62 69 | 6c 69 74 79 20 66 6f 72 | the abi|lity for|
|00006230| 20 61 20 73 69 6e 67 6c | 65 20 66 75 6e 63 74 69 | a singl|e functi|
|00006240| 6f 6e 20 74 6f 20 72 65 | 63 65 69 76 65 0a 63 61 |on to re|ceive.ca|
|00006250| 6c 6c 73 20 69 73 73 75 | 65 64 20 77 69 74 68 20 |lls issu|ed with |
|00006260| 76 61 72 79 69 6e 67 20 | 70 72 6f 74 6f 74 79 70 |varying |prototyp|
|00006270| 65 73 2e 20 20 54 68 69 | 73 20 77 69 6c 6c 20 72 |es. Thi|s will r|
|00006280| 65 71 75 69 72 65 20 74 | 77 6f 0a 22 66 75 6e 63 |equire t|wo."func|
|00006290| 74 69 6f 6e 73 22 0a 0a | 20 20 76 6f 69 64 20 67 |tions"..| void g|
|000062a0| 65 74 5f 61 72 67 73 28 | 73 74 72 75 63 74 20 64 |et_args(|struct d|
|000062b0| 61 74 75 6d 20 2a 61 72 | 67 75 6d 65 6e 74 73 29 |atum *ar|guments)|
|000062c0| 3b 0a 0a 20 20 76 6f 69 | 64 20 70 75 74 5f 72 65 |;.. voi|d put_re|
|000062d0| 74 75 72 6e 28 73 74 72 | 75 63 74 20 64 61 74 75 |turn(str|uct datu|
|000062e0| 6d 20 76 61 6c 75 65 29 | 3b 0a 0a 49 6e 20 62 6f |m value)|;..In bo|
|000062f0| 74 68 20 63 61 73 65 73 | 2c 20 79 6f 75 27 64 20 |th cases|, you'd |
|00006300| 73 75 70 70 6c 79 20 74 | 79 70 65 20 69 6e 66 6f |supply t|ype info|
|00006310| 72 6d 61 74 69 6f 6e 3b | 20 69 6e 20 70 75 74 5f |rmation;| in put_|
|00006320| 72 65 74 75 72 6e 28 29 | 20 79 6f 75 27 64 0a 61 |return()| you'd.a|
|00006330| 6c 73 6f 20 73 75 70 70 | 6c 79 20 74 68 65 20 76 |lso supp|ly the v|
|00006340| 61 6c 75 65 2e 0a 0a 49 | 6e 20 67 65 6e 65 72 61 |alue...I|n genera|
|00006350| 6c 2c 20 74 68 65 73 65 | 20 74 77 6f 20 63 61 6e |l, these| two can|
|00006360| 6e 6f 74 20 62 65 20 68 | 6f 6e 65 73 74 20 66 75 |not be h|onest fu|
|00006370| 6e 63 74 69 6f 6e 20 63 | 61 6c 6c 73 2c 20 73 69 |nction c|alls, si|
|00006380| 6e 63 65 20 66 6f 72 0a | 65 78 61 6d 70 6c 65 20 |nce for.|example |
|00006390| 67 65 74 5f 61 72 67 73 | 28 29 20 63 6f 6e 74 61 |get_args|() conta|
|000063a0| 69 6e 73 20 61 6e 20 69 | 6d 70 6c 69 63 69 74 20 |ins an i|mplicit |
|000063b0| 5f 5f 62 75 69 6c 74 69 | 6e 5f 73 61 76 65 72 65 |__builti|n_savere|
|000063c0| 67 73 28 29 2e 0a 53 6f | 6d 65 74 69 6d 65 73 20 |gs()..So|metimes |
|000063d0| 6b 6c 75 64 67 65 73 20 | 61 72 65 20 61 76 61 69 |kludges |are avai|
|000063e0| 6c 61 62 6c 65 20 74 6f | 20 61 76 6f 69 64 20 61 |lable to| avoid a|
|000063f0| 73 73 65 6d 62 6c 65 72 | 20 69 6e 73 65 72 74 69 |ssembler| inserti|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.